summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MTD] Use single flag to mark writeable devices.Joern Engel2006-05-221-6/+4
| | | | | | | | | Two flags exist to decide whether a device is writeable or not. None of those two flags is checked for independently, so they are clearly redundant, if not an invitation to bugs. This patch removed both of them, replacing them with a single new flag. 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] 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>
* Merge git://git.infradead.org/jffs2-devel-2.6David Woodhouse2006-05-2132-361/+3306
|\
| * [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>
| * [JFFS2] Mark gaps in summary list as dirty spaceDavid Woodhouse2006-05-211-29/+42
| | | | | | | | | | | | | | Make sure we allocate a ref for any dirty space which exists between nodes which we find in an eraseblock summary. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Discard remaining free space when filing a dirty block in scan.David Woodhouse2006-05-211-21/+26
| | | | | | | | | | | | | | | | The incoming ref_totlen() calculation is going to rely on the existence of nodes which cover all dirty space. We can't just tweak the accounting data any more; we have to call jffs2_scan_dirty_space() to do it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Introduce jffs2_scan_dirty_space() function.David Woodhouse2006-05-215-46/+75
| | | | | | | | | | | | | | | | To eliminate the __totlen field from struct jffs2_raw_node_ref, we need to allocate nodes for dirty space instead of just tweaking the accounting data. Introduce jffs2_scan_dirty_space() in preparation for that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Fix summary handling of unknown but compatible nodes.David Woodhouse2006-05-213-6/+22
| | | | | | | | | | | | | | For RWCOMPAT and ROCOMPAT nodes, we should still allow the mount to succeed. Just abandon the summary and fall through to the full scan. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Fix memory leak in scan code; improve comments.David Woodhouse2006-05-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | If we had to allocate extra space for the summary node, we weren't correctly freeing it when jffs2_sum_scan_sumnode() returned nonzero -- which is both the success and the failure case. Only when it returned zero, which means fall through to the full scan, were we correctly freeing the buffer. Document the meaning of those return codes while we're at it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Correct handling of JFFS2_FEATURE_RWCOMPAT_COPY nodes.David Woodhouse2006-05-214-23/+55
| | | | | | | | | | | | | | | | | | We should preserve these when we come to garbage collect them, not let them get erased. Use jffs2_garbage_collect_pristine() for this, and make sure the summary code copes -- just refrain from writing a summary for any block which contains a node we don't understand. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Correct accounting of erroneous cleanmarkers and failed summaries.David Woodhouse2006-05-201-3/+3
| | | | | | | | | | | | | | It should all be counted as dirty space, not wasted and _definitely_ not unchecked. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Introduce jffs2_link_node_ref() function to reduce code duplicationDavid Woodhouse2006-05-206-122/+68
| | | | | | | | | | | | | | | | The same sequence of code was repeated in many places, to add a new struct jffs2_raw_node_ref to an eraseblock and adjust the space accounting accordingly. Move it out-of-line. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * Merge git://git.infradead.org/jffs2-xattr-2.6David Woodhouse2006-05-2029-15/+2822
| |\ | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| | * Merge git://git.infradead.org/mtd-2.6KaiGai Kohei2006-05-19360-4469/+6627
| | |\
| | * | [JFFS2][XATTR] Fix obvious typoKaiGai Kohei2006-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [2/2] jffs2-xattr-v5.2-02-fix_obvious_typo.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] Handling the duplicate JFFS2_NODETYPE_XATTR node cases.KaiGai Kohei2006-05-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When jffs2_sum_process_sum_data() found a JFFS2_NODETYPE_XATTR which has duplicate xid and older version, an error was returned without appropriate process. In the result, mounting filesystem is failed. This patch fix this problem. If jffs2_setup_xattr_datum() returned -EEXIST, the caller marks this node as DIRTY_SPACE(). [1/2] jffs2-xattr-v5.2-01-fix-duplicate-xdatum.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] remove redundant pointer cast in acl.cKaiGai Kohei2006-05-131-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove redundant pointer cast in acl.c. [10/10] jffs2-xattr-v5.1-10-remove_pointer_cast.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] remove '__KERNEL__' from acl.hKaiGai Kohei2006-05-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | [9/10] jffs2-xattr-v5.1-09-remove__KERNEL__.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] remove senseless commentKaiGai Kohei2006-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove senseless comment. [8/10] jffs2-xattr-v5.1-08-remove_senseless_comment.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] Unify each file header part with any jffs2 file.KaiGai Kohei2006-05-137-52/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify each file header part with any jffs2 file. [7/10] jffs2-xattr-v5.1-07-unify_file_header.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] '#include <linux/list.h>' was added into xattr.h.KaiGai Kohei2006-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '#include <linux/list.h>' was added into xattr.h. because 'struct list_head' is used in this header file. [6/10] jffs2-xattr-v5.1-06-add_list.h.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] Remove jffs2_garbage_collect_xattr(c, ic)KaiGai Kohei2006-05-133-57/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove jffs2_garbage_collect_xattr(c, ic). jffs2_garbage_collect_xattr_datum/ref() are called from gc.c directly. In original implementation, jffs2_garbage_collect_xattr(c, ic) returns with holding a spinlock if 'ic' is inode_cache. But it returns after releasing a spinlock if 'ic' is xattr_datum/ref. It looks so confusable behavior. Thus, this patch makes caller manage locking/unlocking. [5/10] jffs2-xattr-v5.1-05-update_xattr_gc.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] Remove 'struct list_head ilist' from jffs2_inode_cache.KaiGai Kohei2006-05-139-43/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch can reduce 4-byte of memory usage per inode_cache. [4/10] jffs2-xattr-v5.1-04-remove_ilist_from_ic.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] Add a description about c->xattr_semKaiGai Kohei2006-05-131-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a description about the c->xattr_sem read/write semaphore into README.Locking. [3/10] jffs2-xattr-v5.1-03-append_README.Locking.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] remove typedef from posix_acl related definition.KaiGai Kohei2006-05-132-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jffs2_acl_header, jffs2_acl_entry and jffs2_acl_entry_short were redefined with using 'struct' instead of 'typedef' in kernel implementation. [1/10] jffs2-xattr-v5.1-01-remove_typedef_kernel.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
| | * | [JFFS2][XATTR] XATTR support on JFFS2 (version. 5)KaiGai Kohei2006-05-1329-15/+2800
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attached patches provide xattr support including POSIX-ACL and SELinux support on JFFS2 (version.5). There are some significant differences from previous version posted at last December. The biggest change is addition of EBS(Erase Block Summary) support. Currently, both kernel and usermode utility (sumtool) can recognize xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype. In addition, some bugs are fixed. - A potential race condition was fixed. - Unexpected fail when updating a xattr by same name/value pair was fixed. - A bug when removing xattr name/value pair was fixed. The fundamental structures (such as using two new nodetypes and exclusion mechanism by rwsem) are unchanged. But most of implementation were reviewed and updated if necessary. Espacially, we had to change several internal implementations related to load_xattr_datum() to avoid a potential race condition. [1/2] xattr_on_jffs2.kernel.version-5.patch [2/2] xattr_on_jffs2.utils.version-5.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Reduce calls to ref_totlen() in jffs2_mark_node_obsolete()David Woodhouse2006-05-201-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were calling ref_totlen() 18 times. Even before that becomes a real function rather than just a dereference, apparently some compilers still suck anyway. It'll _certainly_ suck after ref_totlen() becomes more complicated, so calculate it once and don't rely on CSE. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Optimise reading of eraseblock summary nodesDavid Woodhouse2006-05-203-49/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the time to mount 512MiB of NAND flash on my OLPC prototype by about 4%. We used to read the last page of the eraseblock twice -- once to find the offset of the summary node, and again to actually _read_ the summary node. Now we read the last page only once, and read more only if we need to. We also don't allocate a new buffer just for the summary code -- we use the buffer which was already allocated for the scan. Better still, if the 'buffer' for the scan is actually just a pointer directly into NOR flash, we use that too, avoiding the memcpy() which we used to do. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | | [MTD] Account for MODULE_SYMBOL_PREFIX when requesting NOR chip driverDavid Woodhouse2006-05-211-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | | [MTD] Use symbol_request() in old DiskOnChip probe code to find actual driverDavid Woodhouse2006-05-211-42/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code wouldn't work correctly on architectures which have a non-empty MODULE_SYMBOL_PREFIX, and this version is neater if slightly less optimal in the built-in case. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | | [MTD] Add Amstrad Delta NAND supportJonathan McDowell2006-05-213-0/+245
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch below adds support for the NAND device on the Amstrad Delta. This is a 32MiB 8bit Toshiba device, with the data bus connected to the OMAP MPUIO pins and ALE, CLE, NCE, NRE, NWE and NWP all connected to the Delta's latch2 16bit latch. Signed-Off-By: Jonathan McDowell <noodles@earth.li> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] Avoid 64-bit division in mtdconcatAndrew Morton2006-05-201-2/+6
| | | | | | | | | | | | | | | | | | | | | WARNING: "__moddi3" [drivers/mtd/mtdconcat.ko] undefined! Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] Use __symbol_get() instead of symbol_get() in NOR chip probeDavid Woodhouse2006-05-201-2/+2
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | git-mtd: symbol_get() fixAndrew Morton2006-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/devices/docprobe.c: In function `DoC_Probe': drivers/mtd/devices/docprobe.c:338: warning: assignment from incompatible pointer type drivers/mtd/devices/docprobe.c:341: warning: assignment from incompatible pointer type Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [JFFS2] Remove forgotten summary codeFerenc Havasi2006-05-191-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove forgotten lines from jffs2_scan_eraseblock() which were unnecessary and may cause problem in some environments. Thanks to Alexander Belyakov <alexander.belyakov@intel.com>. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [JFFS2] Support new device nodesDavid Woodhouse2006-05-196-22/+43
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Device node major/minor numbers are just stored in the payload of a single data node. Just extend that to 4 bytes and use new_encode_dev() for it. We only use the 4-byte format if we _need_ to, if !old_valid_dev(foo). This preserves backwards compatibility with older code as much as possible. If we do make devices with major or minor numbers above 255, and then mount the file system with the old code, it'll just read the first two bytes and get the numbers wrong. If it comes to garbage-collect it, it'll then write back those wrong numbers. But that's about the best we can expect. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix printk format error in gen_probe.cDavid Woodhouse2006-05-171-1/+1
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix mtdconcat build. We didn't introduce mtd->writesize yet.David Woodhouse2006-05-171-2/+2
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | MTD: mtdconcat NAND/Sibley support (rev.2)Alexander Belyakov2006-05-171-5/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a second revision of "mtdconcat NAND/Sibley" patch. I hope the patch will not get damaged as I'm posting it from gmail account, thanks to Jorn. The patch adds previously missing concat_writev(), concat_writev_ecc(), concat_block_isbad(), concat_block_markbad() functions to make concatenation layer compatible with Sibley and NAND chips. Patch has been cleared from whitespaces, fixed some lines of code as requested. Also I have added code for alignment check that should support Jorn's "writesize" patch. Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | LASAT depends on MTD_CFIMartin Michlmayr2006-05-171-2/+2
| | | | | | | | | | | | | | | | The following difference was found between the mainline and linux-mips kernel. LASAT depends on MTD_CFI. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Re-add module description for ms02-nv to KconfigMartin Michlmayr2006-05-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | In an unrelated MTD commit, a description about the ms02-nv module got removed from Kconfig. While I personally agree with this removal, the module maintainer (Maciej W. Rozycki) would like to see it added back. In the absense of any consistency regarding Kconfig descriptions his wish should be followed. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud