aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/block2mtd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-20[PATCH] [MTD] block2mtd: remove readahead codeJoern Engel1-53/+4
Over the years there was a slow trickle of complaints against the readahead code. Most of them concerned performance, Peter Zijlstra stumbled over it when working unrelated changes and I believe there was an actual bug report. Oh, Andrew Morton also complained about duplicating code from mm/readahead.c. It is just not worth it. On flash media like usb sticks, readahead will make things go slow - very slow. On spinning disks, readahead may be a win, but this is definitely not the place to add it. Signed-off-by: Jörn Engel <joern@lazybastard.org>
2007-02-20[PATCH] [MTD] block2mtd: remove warningJoern Engel1-3/+3
drivers/mtd/devices/block2mtd.c:311:9: warning: symbol 'dev' shadows an earlier one drivers/mtd/devices/block2mtd.c:294:23: originally declared here Signed-off-by: Jörn Engel <joern@lazybastard.org>
2007-02-20[PATCH] [MTD] block2mtd: remove castsJoern Engel1-2/+2
Remove two casts - they were not only pointless, but outright harmful. Spotted by Felix Fietkau <nbd@openwrt.org> Signed-off-by: Jörn Engel <joern@lazybastard.org>
2007-02-11[PATCH] remove invalidate_inode_pages()Andrew Morton1-1/+2
Convert all calls to invalidate_inode_pages() into open-coded calls to invalidate_mapping_pages(). Leave the invalidate_inode_pages() wrapper in place for now, marked as deprecated. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-11-28[MTD] replace kmalloc+memset with kzallocBurman Yan1-2/+1
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-07-15block2mtd.c: Make kernel boot command line arguments work (try 4)Ville Herva1-30/+63
Trying to pass kernel command line arguments to block2mtd at boot-time does not work currently. block2mtd_setup() is called so early that kmalloc() fails nevermind being able to do open_bdev_excl() (which requires rootfs to be mounted. This patch only saves the option string at the early boot stage, and parses them later when block2mtd_init() is called. If open_bdev_excl() fails, open_by_devnum(name_to_dev_t()) is tried instead, which makes it possible to initialize the driver before rootfs has been mounted. Also gets rid of the superfluous parse_name() that only checks if name is longer than 80 chars and copies it to a string that is not kfreed. With this patch, I can boot statically compiled block2mtd, and mount jffs2 as rootfs (without modules or initrd), with lilo config like this: root=/dev/mtdblock0 append="rootfstype=jffs2 block2mtd.block2mtd=/dev/hdc2,65536" (Note that rootfstype=jffs2 is required, since the kernel only tries filesystems without "nodev" attribute by default, and jffs is "nodev"). Compared to first version of this patch, this one does not copy the parameters to the global buffer if init has already been called, and the global array is marked as __initdata. Compared to the second version of this patch, module build is fixed. Compared to the third version of this patch, statically compiled block2mtd driver with no boot-time parameter no longer gives spurious error 'cannot open device ""' Signed-off-by: Ville Herva <vherva@vianova.fi> Acked-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-22[MTD] Initialize 'writesize'Artem B. Bityutskiy1-0/+1
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
2006-06-14[MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse1-1/+1
Let's not attempt the abolition of mtd->type until/unless it's properly thought through. And certainly, let's not do it by halves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel1-1/+1
Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-25[MTD] Remove the only useless readv implementationThomas Gleixner1-1/+0
Removing readv from struct mtd_info broke block2mtd. Remove the reference and the useless default implementation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-14[MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtdDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-14mtd: fix memory leak in block2mtd_setup()Jesper Juhl1-3/+6
There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup() We can leak 'name' allocated with kmalloc in 'parse_name' if leave via the 'parse_err' macro since it contains a return but doesn't do any freeing. Spotted by coverity checker as bug 615. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-04-19mtd: improve parameter parsing for block2mtdJoern Engel1-3/+14
Expand the parameter parsing for block2mtd. It now accepts: Ki, Mi, Gi - the official prefixes for binary multiples, see http://physics.nist.gov/cuu/Units/binary.html, ki - mistake on my side and analog to "k" for decimal multiples, KiB, MiB, GiB - for people that prefer to add a "B" for byte, kiB - combination of the above. There were complaints about not accepting "k" for 1024. This has long been common practice, but is known to lead to confusion. Hence the new SI units and hence block2mtd only accepts units that cannot be confused with decimal units. Diverging from common practice doesn't always please people, even if the change is for the better. Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-03-31[PATCH] sem2mutex: drivers/mtd/Ingo Molnar1-6/+7
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29[MTD] Make functions static, include header files with prototypesAdrian Bunk1-3/+3
This patch contains the following possible cleanups: - every file should #include the headers containing the prototypes for it's global functions - make needlessly global functions static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07[MTD] devices: Clean up trailing white spacesThomas Gleixner1-4/+4
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] block2mtd: Fix incompatible pointer typeThomas Gleixner1-9/+8
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] block2mtd: Remove copyright. Fix offset calculationJoern Engel1-4/+3
- Remove Gareth from the Copyrights (at his own request) - Fix the "fscking embarrassment" Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+495
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!