summaryrefslogtreecommitdiffstats
path: root/fs/jffs2
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Fix up symlink function pointersAl Viro2005-08-191-3/+3
| | | | | | | | | | This fixes up the symlink functions for the calling convention change: * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs, smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link() * befs, smbfs, xfs - same for ->put_link() Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] jffs2: fix symlink error handlingAl Viro2005-08-191-4/+6
| | | | | | | | | | | | | | | | | The current calling conventions for ->follow_link() are already fairly complex. What we have is 1) you can return -error; then you must release nameidata yourself and ->put_link() will _not_ be called. 2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0 3) you can do nd_set_link(nd, path) and return 0 4) you can return 0 (after having moved nameidata yourself) jffs2 follow_link() is broken - it has an exit where it returns -EIO and leaks nameidata. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [JFFS2] Fix node allocation leakThomas Gleixner2005-07-151-82/+92
| | | | | | | | | | In the rare case of failing to write the cleanmarker the allocated node was not freed. Pointed out by Forrest Zhao Initial cleanup by Joern Engel Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Avoid compiler warnings when JFFS2_FS_WRITEBUFFER=nTodd Poynor2005-07-131-1/+3
| | | | | Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Init locks early during mountArtem B. Bityuckiy2005-07-132-9/+11
| | | | | | | | In case of a mount error locks might be uninitialized but accessed by the resulting call to jffs2_kill_sb(). Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Rename function and update commentsArtem B. Bityuckiy2005-07-121-7/+7
| | | | | | | | | We recently changed the method of collecting and sorting of tmp_dnode objects to use a temporary RB-tree instead of a temporary list. Rename function and update comments. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Remove needless variable initializationArtem B. Bityuckiy2005-07-121-2/+1
| | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Avoid alloc/dealloc for zero sized nodesArtem B. Bityuckiy2005-07-121-6/+4
| | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Simplify the tree insert code.Artem B. Bityuckiy2005-07-061-5/+4
| | | | | | | | | | It isn't _normal_ that we allow key collision in rbtrees, but it does not matter as long as the two nodes with the same version are together. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Remove compatibilty cruft for ancient kernelsDavid Woodhouse2005-07-064-60/+8
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Optimise jffs2_add_tn_to_list David Woodhouse2005-07-063-27/+88
| | | | | | | | | Use an rbtree instead of a simple linked list. We were wasting an amazing amount of time in jffs2_add_tn_to_list(). Thanks to Artem Bityuckiy and Jarkko Jlavinen for noticing. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Merge with rsync://fileserver/linuxThomas Gleixner2005-06-261-1/+1
|\ | | | | | | Update to Linus latest
| * [PATCH] jffs2 build fixAndrew Morton2005-06-261-1/+1
| | | | | | | | | | | | | | | | Missed conversion in the swsusp cleanup. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [JFFS2] Whitespace cleanup. Fix missing debug messageThomas Gleixner2005-05-232-6/+7
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix crosscompileThomas Gleixner2005-05-231-2/+2
| | | | | | | | | | | | Include sched.h instead of asm/semaphore.h to make it compile everywhere. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix cleanup in case of GC-Task not startedThomas Gleixner2005-05-231-2/+5
| | | | | | | | | | | | | | Do not call wait_for_completion, when the gc task is not there. Prevent an oops when the gc thread was not started. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Convert thread start semaphore to completionThomas Gleixner2005-05-231-4/+4
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Kill GC thread before cleanupArtem B. Bityuckiy2005-05-231-3/+3
| | | | | | | | | | | | | | First kill GC thread, then start clearing the internal structures Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Suppress annoying debug messagesArtem B. Bityuckiy2005-05-231-3/+3
| | | | | | | | | | | | | | Embrace uneeded messages in D1(). Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix NOR only compileArtem B. Bityuckiy2005-05-232-7/+5
| | | | | | | | | | | | | | | | | | | | Fix the bug that caouses problems when compiling for NOR. We read a newly erased block so we don't need to check ECC. Define jffs2_is_writebuffered as zero if there is no wbuf. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix inode allocation raceDavid Woodhouse2005-05-233-6/+13
| | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix race in garbage collectorArtem B. Bityuckiy2005-05-232-7/+37
| | | | | | | | | | | | | | | | Fix the race problem described here: http://lists.infradead.org/pipermail/linux-mtd/2005-April/012361.html Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Add KERN_DEBUG level to printksArtem B. Bityuckiy2005-05-231-3/+3
| | | | | | | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix race problems with wbuf.Artem B. Bityuckiy2005-05-232-10/+10
| | | | | | | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Prevent deadlock when flushing write bufferArtem B. Bityuckiy2005-05-231-1/+3
| | | | | | | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Forbid to free inode_cache objects if its nlink isn't zero.Artem B. Bityuckiy2005-05-232-4/+4
| | | | | | | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Improve garbage collector block selectionArtem B. Bityuckiy2005-05-231-1/+7
| | | | | | | | | | | | | | | | Make sure the erase_pending_wbuf_list's blocks are taken into account when picking the block to GC. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Use function to manipulate superblock dirty flagArtem B. Bityuckiy2005-05-231-2/+2
| | | | | | | | | | | | | | | | Use the corresponding function to mark Superblock dirty instead of doing it directly. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Add symlink caching support.Artem B. Bityuckiy2005-05-235-70/+117
| | | | | | | | | | Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix NOR specific scan BUG Artem B. Bityuckiy2005-05-232-8/+12
| | | | | | | | | | | | | | | | | | Fix fairly sad NOR-specific bug - during FS building ic->scan_dents isn't zero, but jffs2_mark_node_obsolete() migt be called it tries to finde the ic corresponding to ref - this requires ic->scan_dents = 0. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Prevent ino cache removal for inodes in useDavid Woodhouse2005-05-235-16/+24
| | | | | | | | | | | | | | | | Don't remove inocache for inodes which are in read_inode() or clear_inode() until they're done. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix node lookupArtem B. Bityuckiy2005-05-231-3/+3
| | | | | | | | | | | | | | | | Look the ref->next_phys field instead of ->next_in_ino to determine if the block has more then one node. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Use a single config option for write buffer supportAndrew Victor2005-05-237-44/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the current CONFIG_JFFS2_FS_NAND, CONFIG_JFFS2_FS_NOR_ECC and CONFIG_JFFS2_FS_DATAFLASH with a single configuration option - CONFIG_JFFS2_FS_WRITEBUFFER. The only functional change of this patch is that the slower div/mod calculations for SECTOR_ADDR(), PAGE_DIV() and PAGE_MOD() are now always used when CONFIG_JFFS2_FS_WRITEBUFFER is enabled. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Add support for JFFS2-on-Dataflash devices.Andrew Victor2005-05-236-14/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Dataflash, can_mark_obsolete = false and the NAND write buffering code (wbuf.c) is used. Since the DataFlash chip will automatically erase pages when writing, the cleanmarkers are not needed - so cleanmarker_oob = false and cleanmarker_size = 0 DataFlash page-sizes are not a power of two (they're multiples of 528 bytes). The SECTOR_ADDR macro (added in the previous core patch) is replaced with a (slower) div/mod version if CONFIG_JFFS2_FS_DATAFLASH is selected. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Core changes required to support JFFS2-on-Dataflash devices.Andrew Victor2005-05-235-44/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DataFlash page-sizes are not a power of two (they're multiples of 528 bytes). There are a few places in JFFS2 code where sector_size is used as a bitmask. A new macro (SECTOR_ADDR) was defined to calculate these sector addresses. For non-DataFlash devices, the original (faster) bitmask operation is still used. In scan.c, the EMPTY_SCAN_SIZE was a constant of 1024. Since this could be larger than the sector size of the DataFlash, this is now basically set to MIN(sector_size, 1024). Addition of a jffs2_is_writebuffered() macro. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Prevent deadlock during write buffer recoveryEstelle Hammache2005-05-231-4/+8
| | | | | | | | | | | | | | | | Prevent deadlock when checking erased block for space allocation during wbuf recovery. Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Remove NAND dependencies for NOR FLASHDavid Woodhouse2005-05-231-1/+7
| | | | | | | | | | | | | | make NAND code work on NOR flash again Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Code cleanup Estelle Hammache2005-05-233-47/+28
| | | | | | | | | | | | | | Code beautification and block filing correction for optimization. Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix refile of blocks due to write failure. Estelle Hammache2005-05-231-3/+6
| | | | | | | | | | | | | | | | | | avoid segfault when nextblock was refiled because of a write failure - avoid filing blocks on the clean list when they have wasted space Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix block refilingEstelle Hammache2005-05-231-18/+47
| | | | | | | | | | | | | | | | | | - block refiling when writing directly to flash a buffer which is bigger than wbuf - retry cases for flushing wbuf Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Fix write buffer retry caseEstelle Hammache2005-05-231-1/+32
| | | | | | | | | | | | | | | | | | Correction of retry case to avoid silent failure of rmdir when jffs2_wbuf_recover GCs the previous entry (+ corresponding dnode case). Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Avoid warning for empty filesystemsTodd Poynor2005-05-231-2/+2
|/ | | | | | | Avoid "Eep. No valid nodes for ino #1" message for just-created filesystem. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] make some things staticAdrian Bunk2005-05-052-10/+20
| | | | | | | | | | This patch makes some needlessly global identifiers static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Arjan van de Ven <arjanv@infradead.org> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Exterminate PAGE_BUGMatt Mackall2005-05-011-2/+1
| | | | | | | | Remove PAGE_BUG - repalce it with BUG and BUG_ON. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-1635-0/+12564
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!
OpenPOWER on IntegriCloud