aboutsummaryrefslogtreecommitdiffstats
path: root/fs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-06-20Merge git://git.infradead.org/~dwmw2/rbtree-2.6Linus Torvalds4-14/+13
* git://git.infradead.org/~dwmw2/rbtree-2.6: [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency Update UML kernel/physmem.c to use rb_parent() accessor macro [RBTREE] Update hrtimers to use rb_parent() accessor macro. [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node. [RBTREE] Merge colour and parent fields of struct rb_node. [RBTREE] Remove dead code in rb_erase() [RBTREE] Update JFFS2 to use rb_parent() accessor macro. [RBTREE] Update eventpoll.c to use rb_parent() accessor macro. [RBTREE] Update key.c to use rb_parent() accessor macro. [RBTREE] Update ext3 to use rb_parent() accessor macro. [RBTREE] Change rbtree off-tree marking in I/O schedulers. [RBTREE] Add accessor macros for colour and parent fields of rb_node
2006-06-20Merge git://git.infradead.org/mtd-2.6Linus Torvalds37-1369/+4372
* git://git.infradead.org/mtd-2.6: (199 commits) [MTD] NAND: Fix breakage all over the place [PATCH] NAND: fix remaining OOB length calculation [MTD] NAND Fixup NDFC merge brokeness [MTD NAND] S3C2410 driver cleanup [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation. [JFFS2] Check CRC32 on dirent and data nodes each time they're read [JFFS2] When retiring nextblock, allocate a node_ref for the wasted space [JFFS2] Mark XATTR support as experimental, for now [JFFS2] Don't trust node headers before the CRC is checked. [MTD] Restore MTD_ROM and MTD_RAM types [MTD] assume mtd->writesize is 1 for NOR flashes [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles [MTD] Prepare physmap for 64-bit-resources [JFFS2] Fix more breakage caused by janitorial meddling. [JFFS2] Remove stray __exit from jffs2_compressors_exit() [MTD] Allow alternate JFFS2 mount variant for root filesystem. [MTD] Disconnect struct mtd_info from ABI [MTD] replace MTD_RAM with MTD_GENERIC_TYPE [MTD] replace MTD_ROM with MTD_GENERIC_TYPE [MTD] remove a forgotten MTD_XIP ...
2006-06-18[JFFS2] Check CRC32 on dirent and data nodes each time they're readDavid Woodhouse2-15/+38
Also, make sure dirents are marked REF_UNCHECKED when we 'discover' them through eraseblock summary. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-18[JFFS2] When retiring nextblock, allocate a node_ref for the wasted spaceDavid Woodhouse1-4/+22
Failing to do so makes the calculated length of the last node incorrect, when we're not using eraseblock summaries. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-18[JFFS2] Mark XATTR support as experimental, for nowDavid Woodhouse1-28/+28
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-18[JFFS2] Don't trust node headers before the CRC is checked.David Woodhouse1-28/+34
Especially when summary code is used, we can have in-memory data structures referencing certain nodes without them actually being readable on the flash. Discard the nodes gracefully in that case, rather than triggering a BUG(). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-17[PATCH] Fix missing ret assignment in __bio_map_user() error pathJens Axboe1-2/+3
If get_user_pages() returns less pages than what we asked for, we jump to out_unmap which will return ERR_PTR(ret). But ret can contain a positive number just smaller than local_nr_pages, so be sure to set it to -EFAULT always. Problem found and diagnosed by Damien Le Moal <damien@sdl.hitachi.co.jp> Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-14[PATCH] Return error in case flock_lock_file failureKirill Korotaev1-0/+2
If flock_lock_file() failed to allocate flock with locks_alloc_lock() then "error = 0" is returned. Need to return some non-zero. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-09[JFFS2] Fix more breakage caused by janitorial meddling.David Woodhouse1-2/+2
jffs2_zlib_exit() and free_workspaces() shouldn't be marked __exit because they get called in the error case from the init functions. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-08[PATCH] debugfs inode leakJens Axboe1-1/+2
Looking at the reiser4 crash, I found a leak in debugfs. In debugfs_mknod(), we create the inode before checking if the dentry already has one attached. We don't free it if that is the case. These bugs happen quite often, I'm starting to think we should disallow such coding in CodingStyle. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05[PATCH] fs/namei.c: Call to file_permission() under a spinlock in do_lookup_path()Trond Myklebust1-9/+10
From: Trond Myklebust <Trond.Myklebust@netapp.com> We're presently running lock_kernel() under fs_lock via nfs's ->permission handler. That's a ranking bug and sometimes a sleep-in-spinlock bug. This problem was introduced in the openat() patchset. We should not need to hold the current->fs->lock for a codepath that doesn't use current->fs. [vsu@altlinux.ru: fix error path] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-03[JFFS2] Remove stray __exit from jffs2_compressors_exit()David Woodhouse1-1/+1
It's used from the initfunc in case of failure too. We could actually do with an '__initexit' for this kind of thing -- when built in to the kernel, it could do with being dropped with the init text. We _could_ actually just use __init for it, but that would break if/when we start dropping init text from modules. So let's just leave it as it was for now, and mutter a little more about random 'janitorial' fixes from people who aren't paying attention to what they're doing. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-31[PATCH] ext3 resize: fix double unlock_super()Andrew Morton1-1/+0
From: Andrew Morton <akpm@osdl.org> Spotted by Jan Capek <jca@sysgo.com> Cc: "Stephen C. Tweedie" <sct@redhat.com> Cc: Andreas Dilger <adilger@clusterfs.com> Cc: Jan Capek <jca@sysgo.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-30[[CIFS] Pass truncate open flag through on file open in case setattr failsSteve French1-0/+2
on set size to zero. Signed-off-by: Sebastian Voitzsch <sebastoam/vpotzscj@web.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] Fix typos in previous fixSteve French2-5/+5
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] endian fix for new POSIX byte range lock supportSteve French1-2/+2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] fix memory leak in cifs session info struct on reconnectSteve French1-6/+82
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] ACPI suspend oopsSteve French1-2/+4
Wasn't able to reproduce a hard hang, but was able to get an oops if suspended the machine during a copy to the cifs mount. This led to some things hanging, including a "sync". Also got I/O errors when trying to access the mount afterwards (even when didn't see the oops), and had to unmount and remount in order to access the filesystem. This patch fixed the oops. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] Do not limit the length of share names (was 100 for whole UNC name)Steve French2-4/+9
during mount. Especially important for some non-Western languages. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[CIFS] Fix new POSIX Locking for setting lock_type correctly on unlockSteve French5-7/+42
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-05-30[JFFS2] Preallocate node refs for cleanmarker in summary scanDavid Woodhouse1-5/+8
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[JFFS2] Fix calculation of potential summary marker offset on NOR flash.David Woodhouse1-1/+1
Helps if we look _inside_ the buffer, rather than adding jeb->offset to it. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-29[MTD] NAND Signal that a bitflip was corrected by ECCThomas Gleixner1-15/+17
Return -EUCLEAN on read when a bitflip was detected and corrected, so the clients can react and eventually copy the affected block to a spare one. Make all in kernel users aware of the change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Rework the out of band handling completelyThomas Gleixner2-112/+119
Hopefully the last iteration on this! The handling of out of band data on NAND was accompanied by tons of fruitless discussions and halfarsed patches to make it work for a particular problem. Sufficiently annoyed by I all those "I know it better" mails and the resonable amount of discarded "it solves my problem" patches, I finally decided to go for the big rework. After removing the _ecc variants of mtd read/write functions the solution to satisfy the various requirements was to refactor the read/write _oob functions in mtd. The major change is that read/write_oob now takes a pointer to an operation descriptor structure "struct mtd_oob_ops".instead of having a function with at least seven arguments. read/write_oob which should probably renamed to a more descriptive name, can do the following tasks: - read/write out of band data - read/write data content and out of band data - read/write raw data content and out of band data (ecc disabled) struct mtd_oob_ops has a mode field, which determines the oob handling mode. Aside of the MTD_OOB_RAW mode, which is intended to be especially for diagnostic purposes and some internal functions e.g. bad block table creation, the other two modes are for mtd clients: MTD_OOB_PLACE puts/gets the given oob data exactly to/from the place which is described by the ooboffs and ooblen fields of the mtd_oob_ops strcuture. It's up to the caller to make sure that the byte positions are not used by the ECC placement algorithms. MTD_OOB_AUTO puts/gets the given oob data automaticaly to/from the places in the out of band area which are described by the oobfree tuples in the ecclayout data structre which is associated to the devicee. The decision whether data plus oob or oob only handling is done depends on the setting of the datbuf member of the data structure. When datbuf == NULL then the internal read/write_oob functions are selected, otherwise the read/write data routines are invoked. Tested on a few platforms with all variants. Please be aware of possible regressions for your particular device / application scenario Disclaimer: Any whining will be ignored from those who just contributed "hot air blurb" and never sat down to tackle the underlying problem of the mess in the NAND driver grown over time and the big chunk of work to fix up the existing users. The problem was not the holiness of the existing MTD interfaces. The problems was the lack of time to go for the big overhaul. It's easy to add more mess to the existing one, but it takes alot of effort to go for a real solution. Improvements and bugfixes are welcome! Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner1-7/+8
Most of those macros are unused and the used ones just obfuscate the code. Remove them and fixup all users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner2-36/+17
The nand_oobinfo structure is not fitting the newer error correction demands anymore. Replace it by struct nand_ecclayout and fixup the users all over the place. Keep the nand_oobinfo based ioctl for user space compability reasons. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Consolidate oobinfo handlingThomas Gleixner1-1/+1
The info structure for out of band data was copied into the mtd structure. Make it a pointer and remove the ability to set it from userspace. The position of ecc bytes is defined by the hardware and should not be changed by software. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[JFFS2] Preallocate raw_node_refs in a couple of missing places in scanDavid Woodhouse1-2/+7
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-28[JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.David Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-27[JFFS2] Fix wbuf recovery of f->metadata->raw node.David Woodhouse1-1/+5
A data node might not be in the fraglist; it could be f->metadata. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26[JFFS2] Switch to using an array of jffs2_raw_node_refs instead of a list.David Woodhouse9-225/+351
This allows us to drop another pointer from the struct jffs2_raw_node_ref, shrinking it to 8 bytes on 32-bit machines (if the TEST_TOTLEN) paranoia check is turned off, which will be committed soon). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26[PATCH] affs: possible null pointer dereference in affs_rename()Florin Malita1-2/+1
If affs_bread() fails, the exit path calls mark_buffer_dirty_inode() with a NULL argument. Coverity CID: 312. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-25[JFFS2] Fix 64-bit size_t problems in XATTR code.David Woodhouse2-15/+15
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Fix and improve debugging output during scan.David Woodhouse2-5/+5
Print wasted_size in scanned eraseblocks, print range correctly for summary dirent and inode entries. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Add 'jeb' argument to jffs2_prealloc_raw_node_refs()David Woodhouse7-14/+16
Preallocation of refs is shortly going to be a per-eraseblock thing, rather than per-filesystem. Add the required argument to the function. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Correctly handle wasted space before summary node.David Woodhouse1-2/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] jffs2_free_all_node_refs() doesn't free them all. Rename it.David Woodhouse4-5/+5
... to jffs2_free_jeb_node_refs() since that's what it does. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Allocate node_ref for wasted space when skipping to page boundaryDavid Woodhouse1-5/+2
One more place where we were changing the accounting info without actually allocating a ref for the lost space... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24[JFFS2] Revert Artem's Bunkage in debug messages.David Woodhouse1-2/+2
Random unthinking 'cleanup' caused debug messages like this: Obsoleting node at 0x0006daf4 of len 0x3a4: <7>Dirtying If messages are continuation of an existing line, they don't need to be prefixed with KERN_DEBUG. THINK. Or you will be replaced by a small shell script. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24JFS: Fix multiple errors in metapage_releasepageDave Kleikamp1-15/+5
It looks like metapage_releasepage was making in invalid assumption that the releasepage method would not be called on a dirty page. Instead of issuing a warning and releasing the metapage, it should return 0, indicating that the private data for the page cannot be released. I also realized that metapage_releasepage had the return code all wrong. If it is successful in releasing the private data, it should return 1, otherwise it needs to return 0. Lastly, there is no need to call wait_on_page_writeback, since try_to_release_page will not call us with a page in writback state. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
2006-05-24Merge branch 'master' of git://git.infradead.org/~gleixner/mtd-nand-2.6.gitDavid Woodhouse1-20/+8
2006-05-24[JFFS2] Introduce ref_next() macro for finding next physical nodeDavid Woodhouse6-30/+31
Another part of the preparation for switching to an array... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24[JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.David Woodhouse12-349/+204
As the first step towards eliminating the ref->next_phys member and saving memory by using an _array_ of struct jffs2_raw_node_ref per eraseblock, stop the write functions from allocating their own refs; have them just _reserve_ the appropriate number instead. Then jffs2_link_node_ref() can just fill them in. Use a linked list of pre-allocated refs in the superblock, for now. Once we switch to an array, it'll just be a case of extending that array. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-23[PATCH] md: Make sure bi_max_vecs is set properly in bio_splitNeilBrown1-0/+3
Else a subsequent bio_clone might make a mess. Signed-off-by: Neil Brown <neilb@suse.de> Cc: "Don Dupuis" <dondster@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23[PATCH] knfsd: Fix two problems that can cause rmmod nfsd to dieNeilBrown1-1/+3
Both cause the 'entries' count in the export cache to be non-zero at module removal time, so unregistering that cache fails and results in an oops. 1/ exp_pseudoroot (used for NFSv4 only) leaks a reference to an export entry. 2/ sunrpc_cache_update doesn't increment the entries count when it adds an entry. Thanks to "david m. richter" <richterd@citi.umich.edu> for triggering the problem and finding one of the bugs. Cc: "david m. richter" <richterd@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23[MTD] Remove read/write _ecc variantsThomas Gleixner1-20/+8
MTD clients are agnostic of FLASH which needs ECC suppport. Remove the functions and fixup the callers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner15-291/+234
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[JFFS2] Simplify writebuffer handlingThomas Gleixner1-170/+102
The writev based write buffer implementation was far to complex as in most use cases the write buffer had to be handled anyway. Simplify the write buffer handling and use mtd->write instead. From extensive testing no performance impact has been noted. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[JFFS2] Remove flash offset argument from various functions.David Woodhouse9-115/+135
We don't need the upper layers to deal with the physical offset. It's _always_ c->nextblock->offset + c->sector_size - c->nextblock->free_size so we might as well just let the actual write functions deal with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-22[MTD] Introduce MTD_BIT_WRITEABLEJoern Engel1-4/+2
o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be cleared. o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for STMicro and Intel Sibley flashes with internal ECC. Those flashes disallow clearing of single bits, unlike regular NOR flashes, so the new flag models their behaviour better. o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set and never checked. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>