aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-08-29 07:51:52 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:10:21 -0400
commite88d6e10e5c848fd5be8f89e09e3bce2570886b7 (patch)
tree27b5547a0e24add89deafedaed784328bc3c173e /drivers/mtd/ubi/scan.h
parent33818bbb84cd371b63ed8849cc5264d24c8b3aa2 (diff)
UBI: do not use vmalloc on I/O path
Similar reason as in case of the previous patch: it causes deadlocks if a filesystem with writeback support works on top of UBI. So pre-allocate needed buffers when attaching MTD device. We also need mutexes to protect the buffers, but they do not cause much contantion because they are used in recovery, torture, and WL copy routines, which are called seldom. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.h')
-rw-r--r--drivers/mtd/ubi/scan.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h
index 140e82e26534..46d444af471a 100644
--- a/drivers/mtd/ubi/scan.h
+++ b/drivers/mtd/ubi/scan.h
@@ -147,7 +147,7 @@ static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv,
147 list_add_tail(&seb->u.list, list); 147 list_add_tail(&seb->u.list, list);
148} 148}
149 149
150int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si, 150int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
151 int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, 151 int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
152 int bitflips); 152 int bitflips);
153struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si, 153struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
@@ -155,10 +155,10 @@ struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
155struct ubi_scan_leb *ubi_scan_find_seb(const struct ubi_scan_volume *sv, 155struct ubi_scan_leb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
156 int lnum); 156 int lnum);
157void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv); 157void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv);
158struct ubi_scan_leb *ubi_scan_get_free_peb(const struct ubi_device *ubi, 158struct ubi_scan_leb *ubi_scan_get_free_peb(struct ubi_device *ubi,
159 struct ubi_scan_info *si); 159 struct ubi_scan_info *si);
160int ubi_scan_erase_peb(const struct ubi_device *ubi, 160int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_scan_info *si,
161 const struct ubi_scan_info *si, int pnum, int ec); 161 int pnum, int ec);
162struct ubi_scan_info *ubi_scan(struct ubi_device *ubi); 162struct ubi_scan_info *ubi_scan(struct ubi_device *ubi);
163void ubi_scan_destroy_si(struct ubi_scan_info *si); 163void ubi_scan_destroy_si(struct ubi_scan_info *si);
164 164