summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.infradead.org/~dwmw2/rbtree-2.6Linus Torvalds2006-06-204-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
| * [RBTREE] Update JFFS2 to use rb_parent() accessor macro.David Woodhouse2006-04-212-10/+9
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update eventpoll.c to use rb_parent() accessor macro.David Woodhouse2006-04-211-3/+3
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update ext3 to use rb_parent() accessor macro.David Woodhouse2006-04-211-1/+1
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge git://git.infradead.org/mtd-2.6Linus Torvalds2006-06-2037-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 ...
| * | [JFFS2] Check CRC32 on dirent and data nodes each time they're readDavid Woodhouse2006-06-182-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>
| * | [JFFS2] When retiring nextblock, allocate a node_ref for the wasted spaceDavid Woodhouse2006-06-181-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>
| * | [JFFS2] Mark XATTR support as experimental, for nowDavid Woodhouse2006-06-181-28/+28
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Don't trust node headers before the CRC is checked.David Woodhouse2006-06-181-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>
| * | [JFFS2] Fix more breakage caused by janitorial meddling.David Woodhouse2006-06-091-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>
| * | [JFFS2] Remove stray __exit from jffs2_compressors_exit()David Woodhouse2006-06-031-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>
| * | [JFFS2] Preallocate node refs for cleanmarker in summary scanDavid Woodhouse2006-05-301-5/+8
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix calculation of potential summary marker offset on NOR flash.David Woodhouse2006-05-301-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>
| * | [MTD] NAND Signal that a bitflip was corrected by ECCThomas Gleixner2006-05-291-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>
| * | [MTD] Rework the out of band handling completelyThomas Gleixner2006-05-292-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>
| * | [MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner2006-05-291-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>
| * | [MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner2006-05-292-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>
| * | [MTD] NAND Consolidate oobinfo handlingThomas Gleixner2006-05-291-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>
| * | [JFFS2] Preallocate raw_node_refs in a couple of missing places in scanDavid Woodhouse2006-05-291-2/+7
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.David Woodhouse2006-05-281-1/+1
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix wbuf recovery of f->metadata->raw node.David Woodhouse2006-05-271-1/+5
| | | | | | | | | | | | | | | | | | A data node might not be in the fraglist; it could be f->metadata. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Switch to using an array of jffs2_raw_node_refs instead of a list.David Woodhouse2006-05-269-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>
| * | [JFFS2] Fix 64-bit size_t problems in XATTR code.David Woodhouse2006-05-252-15/+15
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix and improve debugging output during scan.David Woodhouse2006-05-252-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>
| * | [JFFS2] Add 'jeb' argument to jffs2_prealloc_raw_node_refs()David Woodhouse2006-05-257-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>
| * | [JFFS2] Correctly handle wasted space before summary node.David Woodhouse2006-05-251-2/+2
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] jffs2_free_all_node_refs() doesn't free them all. Rename it.David Woodhouse2006-05-254-5/+5
| | | | | | | | | | | | | | | | | | ... to jffs2_free_jeb_node_refs() since that's what it does. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Allocate node_ref for wasted space when skipping to page boundaryDavid Woodhouse2006-05-251-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>
| * | [JFFS2] Revert Artem's Bunkage in debug messages.David Woodhouse2006-05-241-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>
| * | Merge branch 'master' of git://git.infradead.org/~gleixner/mtd-nand-2.6.gitDavid Woodhouse2006-05-241-20/+8
| |\ \
| | * | [MTD] Remove read/write _ecc variantsThomas Gleixner2006-05-231-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>
| * | | [JFFS2] Introduce ref_next() macro for finding next physical nodeDavid Woodhouse2006-05-246-30/+31
| | | | | | | | | | | | | | | | | | | | | | | | Another part of the preparation for switching to an array... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.David Woodhouse2006-05-2412-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>
| * | Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner2006-05-2315-291/+234
| |\ \ | | | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| | * | [JFFS2] Remove flash offset argument from various functions.David Woodhouse2006-05-239-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>
| | * | [MTD] Introduce MTD_BIT_WRITEABLEJoern Engel2006-05-221-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>
| | * | [MTD] Merge STMicro NOR_ECC code with Intel Sibley codeJoern Engel2006-05-223-54/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2002, STMicro started producing NOR flashes with internal ECC protection for small blocks (8 or 16 bytes). Support for those flashes was added by me. In 2005, Intel Sibley flashes copied this strategy and Nico added support for those. Merge the code for both. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| | * | [MTD] Introduce writesizeJoern Engel2006-05-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| | * | [JFFS2] Put list of nodes in common part of ic/x_ref/x_datum structureDavid Woodhouse2006-05-222-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll be using a proper list of nodes in the jffs2_xattr_datum and jffs2_xattr_ref structures, because the existing code to overwrite them is just broken. Put it in the common part at the front of the structure which is shared with the jffs2_inode_cache, so that the jffs2_link_node_ref() function can do the right thing. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| | * | [JFFS2] Add some preemptive BUG checks for XATTR codeDavid Woodhouse2006-05-222-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a couple of places, we assume that what's at the end of the ->next_in_ino list is a struct jffs2_inode_cache. Let's check for that, since we expect it to change soon. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| | * | [JFFS2] Extend jffs2_link_node_ref() to link into per-inode list too.David Woodhouse2006-05-2210-91/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's avoid the potential for forgetting to set ref->next_in_ino, by doing it within jffs2_link_node_ref() instead. This highlights the ugliness of what we're currently doing with xattr_datum and xattr_ref structures -- we should find a nicer way of dealing with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Simplify writebuffer handlingThomas Gleixner2006-05-231-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>
| * | [JFFS2] Initialise ref->next_in_ino when marking dirty space in wbuf flushDavid Woodhouse2006-05-221-0/+1
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix accounting error in jffs2_link_node_ref()David Woodhouse2006-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When filing REF_OBSOLETE nodes, we'd add their size to the global 'dirty_size' count, but then to the eraseblock's 'used_size' count. That's not clever. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix dummy jffs2_sum_scan_sumnode() macro for !SUMMARY case.David Woodhouse2006-05-221-1/+1
| | | | | | | | | | | | | | | | | | I added an argument to the real function... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Finally eliminate __totlen field from struct jffs2_raw_node_refDavid Woodhouse2006-05-213-58/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, almost. We'll actually keep a 'TEST_TOTLEN' macro set for now, and keep doing some paranoia checks to make sure it's all working correctly. But if TEST_TOTLEN is unset, the size of struct jffs2_raw_node_ref drops from 16 bytes to 12 on 32-bit machines. That's a saving of about half a megabyte of memory on the OLPC prototype board, with 125K or so nodes in its 512MiB of flash. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Locking issues in summary write code.David Woodhouse2006-05-211-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use jffs2_scan_dirty_space() because it doesn't do any locking; it's only for use at scan time -- hence the 'scan' in the name. Also, don't allocate refs while we have c->erase_completion_lock held. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Remove stray kfree of summary info in XATTR code.David Woodhouse2006-05-211-10/+11
| | | | | | | | | | | | | | | | | | | | | We don't allocate this locally any more -- it's given to us and owner by our caller. Also improve the debug messages a little. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] File node reference for wasted space when flushing wbufDavid Woodhouse2006-05-211-9/+20
| | | | | | | | | | | | | | | | | | | | | Next step in ongoing campaign to file a struct jffs2_raw_node_ref for every piece of dirty space in the system, so that __totlen can be killed off.... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Add length argument to jffs2_add_physical_node_ref()David Woodhouse2006-05-216-29/+15
| | | | | | | | | | | | | | | | | | | | | | | | If __totlen is going away, we need to pass the length in separately. Also stop callers from needlessly setting ref->next_phys to NULL, since that's done for them... and since that'll also be going away soon. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud