summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* memblock: Introduce default allocation limit and use it to replace explicit onesBenjamin Herrenschmidt2010-08-0514-53/+63
| | | | | | | | | | | | | | | | | | | | | This introduce memblock.current_limit which is used to limit allocations from memblock_alloc() or memblock_alloc_base(..., MEMBLOCK_ALLOC_ACCESSIBLE). The old MEMBLOCK_ALLOC_ANYWHERE changes value from 0 to ~(u64)0 and can still be used with memblock_alloc_base() to allocate really anywhere. It is -no-longer- cropped to MEMBLOCK_REAL_LIMIT which disappears. Note to archs: I'm leaving the default limit to MEMBLOCK_ALLOC_ANYWHERE. I strongly recommend that you ensure that you set an appropriate limit during boot in order to guarantee that an memblock_alloc() at any time results in something that is accessible with a simple __va(). The reason is that a subsequent patch will introduce the ability for the array to resize itself by reallocating itself. The MEMBLOCK core will honor the current limit when performing those allocations. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Expose MEMBLOCK_ALLOC_ANYWHEREBenjamin Herrenschmidt2010-08-053-3/+2
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Factor the lowest level alloc functionBenjamin Herrenschmidt2010-08-051-32/+27
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Remove nid_range argument, arch provides memblock_nid_range() insteadBenjamin Herrenschmidt2010-08-053-17/+19
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Remove memblock_find()Benjamin Herrenschmidt2010-08-052-33/+0
| | | | | | Nobody uses it anymore. It's semantics were ... weird Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Remove obsolete accessorsBenjamin Herrenschmidt2010-08-051-23/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/arm: Use new accessorsBenjamin Herrenschmidt2010-08-051-9/+12
| | | | | CC: Russell King <linux@arm.linux.org.uk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/powerpc: Use new accessorsBenjamin Herrenschmidt2010-08-043-71/+46
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/sparc: Use new accessorsBenjamin Herrenschmidt2010-08-041-18/+12
| | | | | CC: David S. Miller <davem@davemloft.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/sh: Use new accessorsBenjamin Herrenschmidt2010-08-041-8/+9
| | | | | CC: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/microblaze: Use new accessorsBenjamin Herrenschmidt2010-08-041-11/+9
| | | | | CC: Michal Simek <monstr@monstr.eu> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Introduce for_each_memblock() and new accessorsBenjamin Herrenschmidt2010-08-041-0/+52
| | | | | | | Walk memblock's using for_each_memblock() and use memblock_region_base/end_pfn() for getting to PFNs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/arm: Use memblock_region_is_memory() for omap fbBenjamin Herrenschmidt2010-08-042-11/+3
| | | | | | Instead of the deprecated memblock_find() Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock/arm: pfn_valid uses memblock_is_memory()Benjamin Herrenschmidt2010-08-041-14/+1
| | | | | | | | | | | The implementation is pretty much similar. There is a -small- added overhead by having another function call and the address shift. If that becomes a concern, I suppose we could actually have memblock itself expose a memblock_pfn_valid() which then ARM can use directly with an appropriate #define... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Implement memblock_is_memory and memblock_is_region_memoryBenjamin Herrenschmidt2010-08-042-8/+36
| | | | | | | | To make it fast, we steal ARM's binary search for memblock_is_memory() and we use that to also the replace existing implementation of memblock_is_reserved(). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: No reason to include asm/memblock.h lateBenjamin Herrenschmidt2010-08-041-2/+2
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Rename memblock_region to memblock_type and memblock_property to ↵Benjamin Herrenschmidt2010-08-0410-120/+118
| | | | | | memblock_region Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* memblock: Fix memblock_is_region_reserved() to return a booleanBenjamin Herrenschmidt2010-08-041-1/+1
| | | | | | | | | | | All callers expect a boolean result which is true if the region overlaps a reserved region. However, the implementation actually returns -1 if there is no overlap, and a region index (0 based) if there is. Make it behave as callers (and common sense) expect. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmwLinus Torvalds2010-08-0311-88/+169
|\ | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Fix recovery stuck bug (try #2) GFS2: Fix typo in stuffed file data copy handling Revert "GFS2: recovery stuck on transaction lock" GFS2: Make "try" lock not try quite so hard GFS2: remove dependency on __GFP_NOFAIL GFS2: Simplify gfs2_write_alloc_required GFS2: Wait for journal id on mount if not specified on mount command line GFS2: Use nobh_writepage
| * GFS2: Fix recovery stuck bug (try #2)Steven Whitehouse2010-08-021-7/+39
| | | | | | | | | | | | | | | | | | This is a clean up of the code which deals with LM_FLAG_NOEXP which aims to remove any possible race conditions by using gl_spin to cover the gap between testing for the LM_FLAG_NOEXP and the GL_FROZEN flag. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: Fix typo in stuffed file data copy handlingAbhijith Das2010-07-301-1/+1
| | | | | | | | | | | | | | | | | | trunc_start() in bmap.c incorrectly uses sizeof(struct gfs2_inode) instead of sizeof(struct gfs2_dinode). Signed-off-by: Abhi Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * Revert "GFS2: recovery stuck on transaction lock"Steven Whitehouse2010-07-291-10/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit b7dc2df5725fe7355fd76000ead7e39728e1b8a9. The initial patch didn't quite work since it doesn't cover all the possible routes by which the GLF_FROZEN flag might be set. A revised fix is coming up in the next patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: Make "try" lock not try quite so hardSteven Whitehouse2010-07-291-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like a big change, but in reality its only a single line of actual code change, the rest is just moving a function to before its new caller. The "try" flag for glocks is a rather subtle and delicate setting since it requires that the state machine tries just hard enough to ensure that it has a good chance of getting the requested lock, but no so hard that the request can land up blocked behind another. The patch adds in an additional check which will fail any queued try locks if there is another request blocking the try lock request which is not granted and compatible, nor in progress already. The check is made only after all pending locks which may be granted have been granted. I've checked this with the reproducer for the reported flock bug which this is intended to fix, and it now passes. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: remove dependency on __GFP_NOFAILDavid Rientjes2010-07-291-2/+9
| | | | | | | | | | | | | | | | | | The k[mc]allocs in dr_split_leaf() and dir_double_exhash() are failable, so remove __GFP_NOFAIL from their masks. Cc: Bob Peterson <rpeterso@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: Simplify gfs2_write_alloc_requiredBob Peterson2010-07-296-35/+14
| | | | | | | | | | | | | | | | | | | | | | Function gfs2_write_alloc_required always returned zero as its return code. Therefore, it doesn't need to return a return code at all. Given that, we can use the return value to return whether or not the dinode needs block allocations rather than passing that value in, which in turn simplifies a bunch of error checking. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: Wait for journal id on mount if not specified on mount command lineSteven Whitehouse2010-07-293-5/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a wait for the journal id in the case that it has not been specified on the command line. This is to allow the future removal of the mount.gfs2 helper. The journal id would instead be directly communicated by gfs_controld to the file system. Here is a comparison of the two systems: Current: 1. mount calls mount.gfs2 2. mount.gfs2 connects to gfs_controld to retrieve the journal id 3. mount.gfs2 adds the journal id to the mount command line and calls the mount system call 4. gfs_controld receives the status of the mount request via a uevent Proposed: 1. mount calls the mount system call (no mount.gfs2 helper) 2. gfs_controld receives a uevent for a gfs2 fs which it doesn't know about already 3. gfs_controld assigns a journal id to it via sysfs 4. the mount system call then completes as normal (sending a uevent according to status) The advantage of the proposed system is that it is completely backward compatible with the current system both at the kernel and at the userland levels. The "first" parameter can also be set the same way, with the restriction that it must be set before the journal id is assigned. In addition, if mount becomes stuck waiting for a reply from gfs_controld which never arrives, then it is killable and will abort the mount gracefully. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * GFS2: Use nobh_writepageSteven Whitehouse2010-07-291-4/+1
| | | | | | | | | | | | | | Use nobh_writepage rather than calling mpage_writepage directly. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Christoph Hellwig <hch@lst.de>
* | Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6Linus Torvalds2010-08-036-74/+198
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'linux-next' of git://git.infradead.org/ubi-2.6: UBI: do not warn unnecessarily UBI: do not print message about corruptes PEBs if we have none of them UBI: improve delete-compatible volumes handling UBI: fix error message and compilation warnings UBI: generate random image_seq when formatting MTD devices UBI: improve ECC error message UBI: improve corrupted flash handling UBI: introduce eraseblock counter variables UBI: introduce a new IO return code UBI: simplify IO error codes
| * | UBI: do not warn unnecessarilyArtem Bityutskiy2010-08-022-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when UBI attaches an MTD device and cannot reserve all 1% (by default) of PEBs for bad eraseblocks handling, it prints a warning. However, Matthew L. Creech <mlcreech@gmail.com> is not very happy to see this warning, because he did reserve enough of PEB at the beginning, but with time some PEBs became bad. The warning is not necessary in this case. This patch makes UBI print the warning o if this is a new image o of this is used image and the amount of reserved PEBs is only 10% (or less) of the size of the reserved PEB pool. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: do not print message about corruptes PEBs if we have none of themArtem Bityutskiy2010-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently UBI prints UBI: corrupted PEBs will be formatted even if there are not corrupted PEBs. Fix this. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: improve delete-compatible volumes handlingBrijesh Singh2010-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a delete-compatible volume is found, it is first added to the 'corr' list, which contains "corrupted" PEBs which should be erased, and then it is added to the used volumes tree. However, the second step should not be done. This does not cause problems in practice, because we never access delete-compattible volumes, but it is still not the right thing to do. [Artem: amended the commit message and few prints] Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: fix error message and compilation warningsArtem Bityutskiy2010-06-142-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the followong compilation warnings introduced by commit 095751a6e0838a712393a74eb0b7b6559dbdbe81: drivers/mtd/ubi/scan.c: In function 'check_what_we_have': drivers/mtd/ubi/scan.c:960: warning: passing argument 1 of 'get_random_bytes' discards qualifiers from pointer target type Fix the following compilation warnings introduced by commit 1a49af2ca019dcb4614c32f832bbcb814b61409c: drivers/mtd/ubi/io.c: In function 'ubi_io_read': drivers/mtd/ubi/io.c:153: warning: initialization makes integer from pointer without a cast drivers/mtd/ubi/io.c:170: warning: format '%s' expects type 'char *', but argument 5 has type 'int' drivers/mtd/ubi/io.c:177: warning: format '%zd' expects type 'signed size_t', but argument 7 has type 'int' drivers/mtd/ubi/io.c:177: warning: too many arguments for format Also, amend the ECC error code string and add brackets and whitespace there - this should make the message readable. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: generate random image_seq when formatting MTD devicesMatthieu CASTET2010-06-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Generate random image_seq when attaching empty MTD device (kernel do the ubi formating). Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: improve ECC error messageArtem Bityutskiy2010-06-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ECC errors are quite typical errors on NAND, so it is worth improving the UBI message and print something like ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 1:4 ... rather than ubi_io_read: error -74 while reading 4096 bytes from PEB 1:4 ... Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: improve corrupted flash handlingArtem Bityutskiy2010-06-041-19/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the way UBI handles corrupted flash, or flash containing garbage or non-UBI data, which is the same from UBI POW. Namely, we do the following: * if 5% or more PEBs are corrupted, refuse the flash * if less than 5% PEBs are corrupted, do not refuse the flash and format these PEBs * if less than 8 PEBs are corrupted, format them silently, otherwise print a warning message. Reported-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
| * | UBI: introduce eraseblock counter variablesArtem Bityutskiy2010-06-042-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just a preparation patch which introduces several 'struct ubi_scan_info' fields which count eraseblocks of different types. This will be used later on to decide whether it is safe to format the flash or not. No functional changes so far. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
| * | UBI: introduce a new IO return codeArtem Bityutskiy2010-06-044-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the %UBI_IO_BAD_HDR_READ return code for the I/O level function. We will use this code in order to distinguish between "corrupted header possibly because this is non-ubi data" and "corrupted header possibly because of real data corruption and ECC error". So far this patch does not introduce any functional change, just a preparation. This patch is pased on a patch from Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
| * | UBI: simplify IO error codesArtem Bityutskiy2010-06-044-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not really need 2 separate error codes for indicating bad VID and bad EC headers (UBI_IO_BAD_EC_HDR, UBI_IO_BAD_VID_HDR), it is enough to have only one UBI_IO_BAD_HDR return code. This patch does not introduce any functional change, only some code simplification. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
* | | Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6Linus Torvalds2010-08-034-14/+29
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'linux-next' of git://git.infradead.org/ubifs-2.6: UBIFS: fix a memory leak on error path. UBIFS: fix GC LEB recovery UBIFS: use ERR_CAST UBIFS: check return code
| * | | UBIFS: fix a memory leak on error path.Matthieu CASTET2010-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 'mount_ubifs()', in case of 'ubifs_leb_unmap()' falure, free allocated resources. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix GC LEB recoveryArtem Bityutskiy2010-07-131-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBIFS tries to alway have an LEB reserved for GC, and stores it in c->gc_lnum. Besides, there is GC head which points to the current GC head LEB. In case of an unclean power cut, what may happen is that the GC head was switched to the reserved GC LEB (c->gc_lnum), but a new reserved GC LEB was not created yet. So, after an unclean reboot we may have no reserved GC LEB, and we need to find a new LEB for this. To do this, we find a dirty LEB which can fit the current GC head, move the data, unmap this dirty LEB, and it becomes our reserved GC LEB. However, if we cannot find a dirty enough LEB, we return failure, which is wrong, because we still can have free LEBs to use for the reserved GC LEB. This patch fixes the issue. This patch also fixes few typos in comments, which were spotted by aspell. Note, this patch fixes a real issue [ 14.328117] UBIFS: recovery needed [ 53.941378] UBIFS error (pid 462): ubifs_rcvry_gc_commit: could not find a dirty LEB [ 89.606399] UBIFS: recovery completed [ 89.609329] UBIFS assert failed in mount_ubifs at 1358 (pid 462) [ 89.616165] [<c0026144>] (unwind_backtrace+0x0/0xe4) from [<c0125ce4>] (ubifs_fill_super+0x11d0/0x1c4c) [ 89.625930] [<c0125ce4>] (ubifs_fill_super+0x11d0/0x1c4c) from [<c0126910>] (ubifs_get_sb+0x1b0/0x354) [ 89.635696] [<c0126910>] (ubifs_get_sb+0x1b0/0x354) from [<c008a50c>] (vfs_kern_mount+0x50/0xe0) [ 89.644485] [<c008a50c>] (vfs_kern_mount+0x50/0xe0) from [<c008a5e0>] (do_kern_mount+0x34/0xdc) [ 89.653274] [<c008a5e0>] (do_kern_mount+0x34/0xdc) from [<c00a29d8>] (do_mount+0x148/0x7cc) [ 89.662063] [<c00a29d8>] (do_mount+0x148/0x7cc) from [<c00a30f4>] (sys_mount+0x98/0xc8) [ 89.670852] [<c00a30f4>] (sys_mount+0x98/0xc8) from [<c0021f40>] (ret_fast_syscall+0x0/0x28) which was reported here: http://article.gmane.org/gmane.linux.drivers.mtd/29923 by Alexander Pazdnikov <pazdnikov@list.ru> Reported-by: Alexander Pazdnikov <pazdnikov@list.ru> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Adrian Hunter <adrian.hunter@nokia.com>
| * | | UBIFS: use ERR_CASTJulia Lawall2010-06-122-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)). The former makes more clear what is the purpose of the operation, which otherwise looks like a no-op. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: check return codeArtem Bityutskiy2010-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error code from 'ubifs_rcvry_gc_commit()' was ignored, so UBIFS failed to recover and continued. Instead, we should refuse mounting the file-system. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* | | | Merge branch 'for-linus' of ↵Linus Torvalds2010-08-0318-123/+1845
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: (22 commits) 9p: fix sparse warnings in new xattr code fs/9p: remove sparse warning in vfs_inode fs/9p: destroy fid on failed remove fs/9p: Prevent parallel rename when doing fid_lookup fs/9p: Add support user. xattr net/9p: Implement TXATTRCREATE 9p call net/9p: Implement attrwalk 9p call 9p: Implement LOPEN fs/9p: This patch implements TLCREATE for 9p2000.L protocol. 9p: Implement TMKDIR 9p: Implement TMKNOD 9p: Define and implement TSYMLINK for 9P2000.L 9p: Define and implement TLINK for 9P2000.L 9p: Define and implement TLINK for 9P2000.L 9p: Implement client side of setattr for 9P2000.L protocol. 9p: getattr client implementation for 9P2000.L protocol. fs/9p: Pass the correct user credentials during attach net/9p: Handle the server returned error properly 9p: readdir implementation for 9p2000.L 9p: Make use of iounit for read/write ...
| * | | | 9p: fix sparse warnings in new xattr codeEric Van Hensbergen2010-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes: CHECK fs/9p/xattr.c fs/9p/xattr.c:73:6: warning: Using plain integer as NULL pointer fs/9p/xattr.c:135:6: warning: Using plain integer as NULL pointer Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
| * | | | fs/9p: remove sparse warning in vfs_inodeEric Van Hensbergen2010-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make v9fs_dentry_from_dir_inode static Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
| * | | | fs/9p: destroy fid on failed removeAneesh Kumar K.V2010-08-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9P spec says: "It is correct to consider remove to be a clunk with the side effect of removing the file if permissions allow. " So even if remove fails we need to destroy the fid. Without this patch an rmdir on a directory with contents leave the new cloned directory fid fid attached to fidlist. On umount we dump the fids on the fidlist ~# rmdir /mnt2/test4/ rmdir: failed to remove `/mnt2/test4/': Directory not empty ~# umount /mnt2/ ~# dmesg [ 228.474323] Found fid 3 not clunked Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
| * | | | fs/9p: Prevent parallel rename when doing fid_lookupAneesh Kumar K.V2010-08-025-39/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During fid lookup we need to make sure that the dentry->d_parent doesn't change so that we can safely walk the parent dentries. To ensure that we need to prevent cross directory rename during fid_lookup. Add a per superblock rename_sem rw_semaphore to prevent parallel fid lookup and rename. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
| * | | | fs/9p: Add support user. xattrAneesh Kumar K.V2010-08-026-3/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
| * | | | net/9p: Implement TXATTRCREATE 9p callAneesh Kumar K.V2010-08-023-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TXATTRCREATE: Prepare a fid for setting xattr value on a file system object. size[4] TXATTRCREATE tag[2] fid[4] name[s] attr_size[8] flags[4] size[4] RXATTRCREATE tag[2] txattrcreate gets a fid pointing to xattr. This fid can later be used to set the xattr value. flag value is derived from set Linux setxattr. The manpage says "The flags parameter can be used to refine the semantics of the operation. XATTR_CREATE specifies a pure create, which fails if the named attribute exists already. XATTR_REPLACE specifies a pure replace operation, which fails if the named attribute does not already exist. By default (no flags), the extended attribute will be created if need be, or will simply replace the value if the attribute exists." The actual setxattr operation happens when the fid is clunked. At that point the written byte count and the attr_size specified in TXATTRCREATE should be same otherwise an error will be returned. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
OpenPOWER on IntegriCloud