summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ieee1394: ieee1394_core printk formatRandy Dunlap2007-04-301-1/+1
| | | | | | | | Fix printk format string: drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: remove usage of skb_queue as packet queueStefan Richter2007-04-306-169/+163
| | | | | | | This considerably reduces the memory requirements for a packet and eliminates ieee1394's dependency on CONFIG_NET. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: csr1212: log if devices have CRC errors in their ROMStefan Richter2007-04-301-18/+9
| | | | | | | | | This will point out firmware bugs. I tested with 11 SBP-2 devices and one OS X PC and got these errors from two old CD-RWs only. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: csr1212: more sensible names for jump targetsStefan Richter2007-04-301-10/+8
| | | | | | | Code beneath two labels called "fail" is actually also reached in case of success. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: csr1212: warn on unreachable codeStefan Richter2007-04-301-2/+5
| | | | | | We want bugs to show themselves. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: shrink csr1212_new_string_descriptor_leafStefan Richter2007-04-301-77/+46
| | | | | | | Make unnecessarily generic code specific and thus simpler. Shrink a lookup table from 128 to 16 bytes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: csr1212: coding styleStefan Richter2007-04-302-113/+133
| | | | | | Whitespace, line breaks, braces... Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: replace vmalloc by kmalloc in csr1212Stefan Richter2007-04-302-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes + sizeof(struct csr1212_csr_rom_cache) big. Most of the time much smaller data structures are allocated. Therefore vmalloc is a waste. The one exception is csr1212_append_new_cache() which is called to append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct csr1212_csr_rom_cache) if the currently allocated ROM cache is too small. CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes. In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the config_rom_2.4 branch. This same commit also switched CSR1212_MALLOC from kmalloc to vmalloc in the SVN trunk branch: > r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines > > CSR1212 Extended ROM bug fixes: > trunk line changes: > - Use vmalloc instead of kmalloc > - Change delayed_reset_bus() to operate in a work_queue instead of a > timer interrupt. > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. > config-rom-2.4 changes: > - Changed extended rom allocation from 256K to 8K. (It was actually 2 kB, not 8 kB.) > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of struct csr1212_csr_rom_cache. Note, this code path is not used by the in-kernel drivers though. raw1394 could trigger it, but the respective libraw1394 functions don't exist yet. Furthermore, userspace programs can replace the entire local ROM via raw1394. If kmalloc does not fulfill their needs --- well, tough luck. I decree that nobody needs such huge extended ROMs. (Extended ROMs are defined by IEEE 1212 clause 7.7.18. The spec does not impose practically relevant restrictions on the size of extended ROM chunks.) Another potentially demanding use of CSR1212_MALLOC is if external FireWire devices come with Extended ROM entries. If they are too big for kmalloc (or have been too big for vmalloc) we just fail to read their ROM. This is quite unlikely though, to my knowledge. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: de-inline some functionsStefan Richter2007-04-303-32/+33
| | | | | | | This small reorganization of public csr1212 functions saves one exported symbol and a few bytes in the driver modules. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: stricter error checks in csr1212Stefan Richter2007-04-303-51/+34
| | | | | | return -EINVAL becomes BUG_ON in checks of function call parameters. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: csr1212: rename some typesStefan Richter2007-04-302-81/+74
| | | | | | Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: drop csr1212's support for external compilationStefan Richter2007-04-304-168/+84
| | | | | | | | | | | csr1212 was written to be compiled either as part of the ieee1394 kernel driver or of an anticipated IEEE 1212 userspace library. We now drop support for the latter. The costs in terms of code footprint and depth of abstraction are not countered by any actual benefit. Also remove some obsolete #includes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: remove unused csr1212 codeStefan Richter2007-04-302-480/+99
| | | | | | | | | Delete unused code. Make some extern functions static. Remove superfluous inline keywords. Move private definitions from csr1212.h to csr1212.c. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: small header cleanupStefan Richter2007-04-302-2/+2
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: move some comments from declaration to definitionStefan Richter2007-04-3018-239/+348
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: remove declarations of nonexisting functionsStefan Richter2007-04-303-14/+1
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: include fixesAndrew Morton2007-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout': drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once drivers/ieee1394/sbp2.c:399: error: for each function it appears in.) drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending' drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout' drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg': drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address' drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write': drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) Possibly due to changes in -mm, but this file should explicitly include the headers for the stuff it uses. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
* ieee1394: sbp2: move some memory allocations into non-atomic contextStefan Richter2007-04-301-15/+5
| | | | | | | When the command ORB pool is created, the ORB list won't be accessed concurrently. Therefore we don't have to take the spinlock there. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: optimize DMA direction of s/g tablesStefan Richter2007-04-301-6/+6
| | | | | | | | | Unlike the name suggests, "cmd->scatter_gather_element" holds only the s/g table, not the actual s/g elements. Since the table is only read but never written by the device, DMA_BIDIRECTIONAL can be replaced by DMA_TO_DEVICE which may be cheaper on some architectures. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: enforce 32bit DMA mappingStefan Richter2007-04-301-0/+5
| | | | | | | | | In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables, ORBs, and response buffers have to reside within the first 4 GB of the FireWire controller's physical address space. Set the correct mask for DMA mappings. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove unnecessary alignments of struct membersStefan Richter2007-04-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of sbp2.h::sbp2_command_info do not have to be aligned themselves --- only the memory which they point to has to be. The member "struct sbp2_command_orb command_orb" has to be aligned on 4 bytes boundary which is guaranteed because it contains u32 members. The member "struct sbp2_unrestricted_page_table scatter_gather_element", i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary according to the SBP-2 spec. This is not a requirement for FireWire controllers but could be expected by SBP-2 targets. I see no need to align the members command_orb and scatter_gather_element on CPU cacheline boundaries. It could have performance benefits, but on the other hand sbp2 has a somewhat wasteful allocation scheme which should be optimized first before further tweaks like cacheline alignments. (E.g. don't always allocate SG_ALL s/g table elements.) Note, before as well as after the patch, the code relies on the assumption that memory alignment in the virtual address space is preserved in the physical address space after DMA mapping. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Merge branch 'upstream-linus' of ↵Linus Torvalds2007-04-273-16/+6
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: sis900: Allocate rx replacement buffer before rx operation usb-net/pegasus: simplify carrier detection
| * sis900: Allocate rx replacement buffer before rx operationNeil Horman2007-04-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just found a hole in my last patch. It was reported to me that shortly after we integrated this patch. The report was of an oops that took place inside of netif_rx when using the sis900 driver. Looking at my origional patch I noted that there was a spot between the new skb_alloc and the refill_rx_ring label where skb got reassigned to the pointer currently held in the rx_ring for the purposes of receiveing the frame. The result of this is however that the buffer that gets passed to netif_rx (if it is called), then gets placed right back into the rx_ring. So if you receive frames fast enough the skb being processed by the network stack can get corrupted. The reporter is testing out the fix I've written for this below (I'm not near my hardware at the moment to test myself), but I wanted to post it for review ASAP. I'll post test results when I hear them, but I think this is a pretty straightforward fix. It just uses a separate pointer to do the rx operation, so that we don't improperly reassign the pointer that we use to refill the rx ring. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * usb-net/pegasus: simplify carrier detectionDan Williams2007-04-272-12/+1
| | | | | | | | | | | | | | | | Simplify pegasus carrier detection; rely only on the periodic MII polling. Reverts pieces of c43c49bd61fdb9bb085ddafcaadb17d06f95ec43. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds2007-04-271-4/+5
|\ \ | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SCSI] esp_scsi.c: Fix compilation.
| * | [SCSI] esp_scsi.c: Fix compilation.Alexey Dobriyan2007-04-271-4/+5
| | | | | | | | | | | | | | | | | | | | | irqreturn.h for irqreturn_t and dma_addr_t being u128 warnings ;-) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2007-04-2715-99/+181
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET]: Fix networking compilation errors [AF_RXRPC/AFS]: Arch-specific fixes. [AFS]: Fix VLocation record update wakeup [NET]: Revert sk_buff walker cleanups.
| * | [NET]: Fix networking compilation errorsDavid Howells2007-04-272-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix miscellaneous networking compilation errors. (*) Export ktime_add_ns() for modules. (*) wext_proc_init() should have an ANSI declaration. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [AF_RXRPC/AFS]: Arch-specific fixes.David Howells2007-04-277-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for various arch compilation problems: (*) Missing module exports. (*) Variable name collision when rxkad and af_rxrpc both built in (rxrpc_debug). (*) Large constant representation problem (AFS_UUID_TO_UNIX_TIME). (*) Configuration dependencies. (*) printk() format warnings. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [AFS]: Fix VLocation record update wakeupDavid Howells2007-04-271-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the wakeup transitions after a VLocation record update completes one way or another. This builds on Dave Miller's partial fix. Also move wakeups outside the spinlocked sections. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | [NET]: Revert sk_buff walker cleanups.David S. Miller2007-04-275-86/+158
| |/ | | | | | | | | | | | | | | | | | | | | This reverts eefa3906283a2b60a6d02a2cda593a7d7d7946c5 The simplification made in that change works with the assumption that the 'offset' parameter to these functions is always positive or zero, which is not true. It can be and often is negative in order to access SKB header values in front of skb->data. Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.infradead.org/mtd-2.6Linus Torvalds2007-04-2775-1724/+2678
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (46 commits) [MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init() [MTD] [NAND] CM-x270 MTD driver [MTD] [NAND] Wrong calculation of page number in nand_block_bad() [MTD] [MAPS] fix plat-ram printk format [JFFS2] Fix compr_rubin.c build after include file elimination. [JFFS2] Handle inodes with only a single metadata node with non-zero isize [JFFS2] Tidy up licensing/copyright boilerplate. [MTD] [OneNAND] Exit loop only when column start with 0 [MTD] [OneNAND] Fix access the past of the real oobfree array [MTD] [OneNAND] Update Samsung OneNAND official URL [JFFS2] Better fix for all-zero node headers [JFFS2] Improve read_inode memory usage, v2. [JFFS2] Improve failure mode if inode checking leaves unchecked space. [JFFS2] Fix cross-endian build. [MTD] Finish conversion mtd_blkdevs to use the kthread API [JFFS2] Obsolete dirent nodes immediately on unlink, where possible. Use menuconfig objects: MTD [MTD] mtd_blkdevs: Convert to use the kthread API [MTD] Fix fwh_lock locking [JFFS2] Speed up mount for directly-mapped NOR flash ...
| * [MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init()Adrian Bunk2007-04-271-1/+1
| | | | | | | | | | | | | | | | | | This patch converts the pci_module_init() usage to pci_register_driver(). It's currently #if 0'ed, but still not a bad idea to change it. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] [NAND] CM-x270 MTD driverMike Rapoport2007-04-273-0/+273
| | | | | | | | | | | | | | This patch provides MTD support for NAND flash devices on CM-x270 modules. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * Merge branch 'master' of ↵David Woodhouse2007-04-271427-62693/+67010
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/mtd/Kconfig Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] [NAND] Wrong calculation of page number in nand_block_bad()Knobloch, Thomas2007-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case that there is no memory based bad block table available the function nand_block_checkbad() in drivers/mtd/nand/nand_base.c will call nand_block_bad() directly. When parameter 'getchip' is set to zero, nand_block_bad() will not right shift the offset to calculate the correct page number. Signed-off-by: Thomas Knobloch <knobloch@siemens.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | Merge branch 'master' of ↵David Woodhouse2007-04-26878-9344/+8812
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * | | [MTD] [MAPS] fix plat-ram printk formatRandy Dunlap2007-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/maps/plat-ram.c:172: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Fix compr_rubin.c build after include file elimination.Andrew Morton2007-04-261-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be silly season lately. (Oops, test builds are more useful if the file in question is actually configured on. dwmw2). Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Handle inodes with only a single metadata node with non-zero isizeDavid Woodhouse2007-04-253-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should never happen unless there's corruption on the medium and the actual data nodes go missing. But the failure mode (an oops when we assume the fragtree isn't empty and go looking for its last node) isn't useful. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Tidy up licensing/copyright boilerplate.David Woodhouse2007-04-2545-217/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, remove the bit in the LICENCE file about contacting Red Hat for alternative arrangements. Their errant IS department broke that arrangement a long time ago -- the policy of collecting copyright assignments from contributors came to an end when the plug was pulled on the servers hosting the project, without notice or reason. We do still dual-license it for use with eCos, with the GPL+exception licence approved by the FSF as being GPL-compatible. It's just that nobody has the right to license it differently. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [MTD] [OneNAND] Exit loop only when column start with 0Adrian Hunter2007-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JFFS2 requests OOB function from column 0. But the oobtest in nand-tests doesn't. So we only exit loop only when column start with 0. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [MTD] [OneNAND] Fix access the past of the real oobfree arrayKyungmin Park2007-04-251-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here it's not the case: all the entries are occupied by OOB chunks. Therefore, once we get into a loop like for (free = this->ecclayout->oobfree; free->length; ++free) { } we might end up scanning past the real oobfree array. Probably the best way out, as the same thing might happen for common NAND as well, is to check index against MTD_MAX_OOBFREE_ENTRIES. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [MTD] [OneNAND] Update Samsung OneNAND official URLKyungmin Park2007-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update Samsung OneNAND official URL. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Better fix for all-zero node headersJoakim Tjernlund2007-04-252-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to check for all-zero header since the header cannot be zero due to other checks. Replace the all-zero header check in readinode.c with a check for the magic word. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Improve read_inode memory usage, v2.David Woodhouse2007-04-253-599/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We originally used to read every node and allocate a jffs2_tmp_dnode_info structure for each, before processing them in (reverse) version order and discarding the ones which are obsoleted by later nodes. With huge logfiles, this behaviour caused memory problems. For example, a file involved in OLPC trac #1292 has 1822391 nodes, and would cause the XO machine to run out of memory during the first stage of read_inode(). Instead of just inserting nodes into a tree in version order as we find them, we now put them into a tree in order of their offset within the file, which allows us to immediately discard nodes which are completely obsoleted. We don't use a full tree with 'fragments' pointing to the real data structure, as we do in the normal fragtree. We sort only on the start address, and add an 'overlapped' flag to the tmp_dnode_info to indicate that the node in question is (partially) overlapped by another. When the scan is complete, we start at the end of the file, adding each node to a real fragtree as before. Where the node is non-overlapped, we just add it (it doesn't matter that it's not the latest version; there is no overlap). When the node at the end of the tree _is_ overlapped, we sort it and all its overlapping nodes into version order and then add them to the fragtree in that order. This 'early discard' reduces the peak allocation of tmp_dnode_info structures from 1.8M to a mere 62872 (3.5%) in the degenerate case referenced above. This version of the patch also correctly rememembers the highest node version# seen for an inode when it's scanned. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Improve failure mode if inode checking leaves unchecked space.David Woodhouse2007-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should never find the unchecked size is non-zero after we've finished checking all inodes. If it happens, used to BUG(), leaving the alloc_sem held and deadlocking. Instead, just return -ENOSPC after complaining. The GC thread will die, but read-only operation should be able to continue and the file system should be unmountable. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Fix cross-endian build.David Woodhouse2007-04-232-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling a LE-capable JFFS2 on PowerPC, wbuf.c fails to compile: fs/jffs2/wbuf.c:973: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:973: error: initializer element is not constant fs/jffs2/wbuf.c:973: error: (near initialization for ‘oob_cleanmarker.magic’) fs/jffs2/wbuf.c:974: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:974: error: initializer element is not constant fs/jffs2/wbuf.c:974: error: (near initialization for ‘oob_cleanmarker.nodetype’) fs/jffs2/wbuf.c:975: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:976: error: initializer element is not constant fs/jffs2/wbuf.c:976: error: (near initialization for ‘oob_cleanmarker.totlen’) Provide constant_cpu_to_je{16,32} functions, and use them for initialising the offending structure. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [MTD] Finish conversion mtd_blkdevs to use the kthread APIChristoph Hellwig2007-04-221-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove waitqueue, 'exiting' flag and completion; use kthread APIs instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Obsolete dirent nodes immediately on unlink, where possible.Joakim Tjernlund2007-04-201-2/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud