- 09 Aug, 2010 1 commit
-
-
Christoph Hellwig authored
Replace inode_setattr with opencoded variants of it in all callers. This moves the remaining call to vmtruncate into the filesystem methods where it can be replaced with the proper truncate sequence. In a few cases it was obvious that we would never end up calling vmtruncate so it was left out in the opencoded variant: spufs: explicitly checks for ATTR_SIZE earlier btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above In addition to that ncpfs called inode_setattr with handcrafted iattrs, which allowed to trim down the opencoded variant. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 22 May, 2010 4 commits
-
-
Venkateswararao Jujjuri authored
This patch removes a redundant fid clone on the directory fid and hence reduces a server transaction while creating new filesystem object. Signed-off-by:
Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Dan Carpenter authored
We never use "v9ses" and so we can remove it. Signed-off-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Venkateswararao Jujjuri authored
Without this patch, an attempt to mksock will get an EINVAL. Before this patch: [root@localhost 1dir]# mksock mysock mksock: error making mysock: Invalid argument With this patch: [root@localhost 1dir]# mksock mysock [root@localhost 1dir]# ls -l mysock s--------- 1 root root 0 2010-03-31 17:44 mysock Signed-off-by:
Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Aneesh Kumar K.V authored
For lookup if we get ENOENT error from the server we still instantiate the dentry. We need to make sure we have dentry operations set in that case so that a later dput on the dentry does the expected. Without the patch we get the below error #ln -sf abc abclink ln: creating symbolic link `abclink': No such file or directory Now on the host do $ touch abclink Guest now gives ENOENT error. # ls ls: cannot access abclink: No such file or directory Debugged-by:
Gautham R Shenoy <ego@in.ibm.com> Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 21 May, 2010 3 commits
-
-
Dmitry Monakhov authored
Signed-off-by:
Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Sripathi Kodi authored
I made a V2 of this patch on top of my patches for VFS switches. All the changes were due to change in some offsets. rename - change name of file or directory size[4] Trename tag[2] fid[4] newdirfid[4] name[s] size[4] Rrename tag[2] The rename message is used to change the name of a file, possibly moving it to a new directory. The 9P wstat message can only rename a file within the same directory. Signed-off-by:
Jim Garlick <garlick@llnl.gov> Signed-off-by:
Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Sripathi Kodi authored
Implements VFS switches for 9p2000.L protocol. Signed-off-by:
Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 05 Apr, 2010 2 commits
-
-
Sripathi Kodi authored
Signed-off-by:
Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Aneesh Kumar K.V authored
We need to drop the link count on the inode of a sucessfull remove Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 30 Mar, 2010 1 commit
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include bloc...
-
- 05 Mar, 2010 2 commits
-
-
Aneesh Kumar K.V authored
For regular file and directories we put the link count in th extension field in a tagged string format. Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Sripathi Kodi authored
Add 9P2000.u and 9P2010.L protocol flags to V9FS VFS This patch adds 9P2000.u and 9P2010.L protocol flags into V9FS VFS side code and removes the single flag used for 'extended'. Signed-off-by:
Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 08 Feb, 2010 1 commit
-
-
M. Mohan Kumar authored
Implement the fsync in the client side by marking stat field values to 'don't touch' so that server may interpret it as a request to guarantee that the contents of the associated file are committed to stable storage before the Rwstat message is returned. Without this patch, calling fsync on a 9p file results in "Invalid argument" error. Please check the attached C program. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Acked-by:
Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 14 Jan, 2010 1 commit
-
-
Al Viro authored
For symlinks generic_readlink() will work just fine and for directories we don't want ->readlink() at all. Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 02 Nov, 2009 1 commit
-
-
Martin Stava authored
I do not know if you've looked on the patch, but unfortunately it is incorrect. A suggested better version is in this email (the old version didn't work in case the user provided buffer was not long enough - it incorrectly appended null byte on a position of last char, and thus broke the contract of the readlink method). However, I'm still not sure this is 100% correct thing to do, I think readlink is supposed to return buffer without last null byte in all cases, but we do return last null byte (even the old version).. on the other hand it is likely unspecified what is in the remaining part of the buffer, so null character may be fine there ;): Signed-off-by:
Martin Stava <martin.stava@gmail.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 23 Sep, 2009 2 commits
-
-
Abhishek Kulkarni authored
This patch adds a persistent, read-only caching facility for 9p clients using the FS-Cache caching backend. When the fscache facility is enabled, each inode is associated with a corresponding vcookie which is an index into the FS-Cache indexing tree. The FS-Cache indexing tree is indexed at 3 levels: - session object associated with each mount. - inode/vcookie - actual data (pages) A cache tag is chosen randomly for each session. These tags can be read off /sys/fs/9p/caches and can be passed as a mount-time parameter to re-attach to the specified caching session. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Abhishek Kulkarni authored
Change all occurrence of inode->i_size with i_size_read() or i_size_write() as appropriate. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 17 Aug, 2009 5 commits
-
-
Abhishek Kulkarni authored
Cast the error return value (ENOMEM) in v9fs_get_inode() to its correct type using ERR_PTR. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Abhishek Kulkarni authored
Add missing p9stat_free in v9fs_inode_from_fid to avoid any possible leaks. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Abhishek Kulkarni authored
Fix the comments -- mostly the improper and/or missing descriptions of function parameters. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Abhishek Kulkarni authored
Add a missing iput when cleaning up if v9fs_get_inode fails after returning a valid inode. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Abhishek Kulkarni authored
Check if v9fs_fid_add was successful or not based on its return value. Signed-off-by:
Abhishek Kulkarni <adkulkar@umail.iu.edu> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 19 Dec, 2008 2 commits
-
-
Wu Fengguang authored
d_iname is rubbish for long file names. Use d_name.name in printks instead. Signed-off-by:
Wu Fengguang <wfg@linux.intel.com> Acked-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Duane Griffin authored
Signed-off-by:
Duane Griffin <duaneg@dghda.com> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 13 Nov, 2008 1 commit
-
-
David Howells authored
Wrap access to task credentials so that they can be separated more easily from the task_struct during the introduction of COW creds. Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id(). Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more sense to use RCU directly rather than a convenient wrapper; these will be addressed by later patches. Signed-off-by:
David Howells <dhowells@redhat.com> Reviewed-by:
James Morris <jmorris@namei.org> Acked-by:
Serge Hallyn <serue@us.ibm.com> Reviewed-by:
Eric Van Hensbergen <ericvh@gmail.com> Cc: Ron Minnich <rminnich@sandia.gov> Cc: Latchesar Ionkov <lucho@ionkov.net> Cc: v9fs-developer@lists.sourceforge.net Signed-off-by:
James Morris <jmorris@namei.org>
-
- 17 Oct, 2008 2 commits
-
-
Magnus Deininger authored
In v9fs_get_inode(), for block, as well as char devices (in theory), the function init_special_inode() is called to set up callback functions for file ops. this function uses the file mode's value to determine whether to use block or char dev functions. In v9fs_inode_from_fid(), the function p9mode2unixmode() is used, but for all devices it initially returns S_IFBLK, then uses v9fs_get_inode() to initialise a new inode, then finally uses v9fs_stat2inode(), which would determine whether the inode is a block or character device. However, at that point init_special_inode() had already decided to use the block device functions, so even if the inode's mode is turned to a character device, the block functions are still used to operate on them. The attached patch simply calls init_special_inode() again for devices after parsing device node data in v9fs_stat2inode() so that the proper functions are used. Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Eric Van Hensbergen authored
Now that the new protocol functions are in place, this patch switches the client code to using the new support code. Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 24 Sep, 2008 1 commit
-
-
Julien Brunel authored
In case of error, the function p9_client_walk returns an ERR pointer, but never returns a NULL pointer. So a NULL test that comes after an IS_ERR test should be deleted. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @match_bad_null_test@ expression x, E; statement S1,S2; @@ x = p9_client_walk(...) ... when != x = E * if (x != NULL) S1 else S2 // </smpl> Signed-off-by:
Julien Brunel <brunel@diku.dk> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
-
- 03 Jul, 2008 1 commit
-
-
Eric Van Hensbergen authored
The legacy protocol's open operation doesn't handle an append operation (it is expected that the client take care of it). We were incorrectly passing the extended protocol's flag through even in legacy mode. This was reported in bugzilla report #10689. This patch fixes the problem by disallowing extended protocol open modes from being passed in legacy mode and implemented append functionality on the client side by adding a seek after the open. Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 14 May, 2008 1 commit
-
-
Eric Van Hensbergen authored
The kernel-doc comments of much of the 9p system have been in disarray since reorganization. This patch fixes those problems, adds additional documentation and a template book which collects the 9p information. Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 07 Feb, 2008 1 commit
-
-
David Howells authored
Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using: perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl 'ERR_PTR[(]*PTR_ERR' fs crypto net security` Signed-off-by:
David Howells <dhowells@redhat.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 06 Feb, 2008 1 commit
-
-
Anthony Liguori authored
GDM gets unhappy if /var/gdm doesn't have the sticky bit set. This patch adds support for the sticky bit in much the same way setuid/setgid is supported. With this patch, I can launch X from a v9fs rootfs (although I quickly run out of fds in the server once gnome starts up). Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> Acked-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 23 Oct, 2007 1 commit
-
-
Latchesar Ionkov authored
In v9fs_vfs_rename function labels don't match the fids that are clunked. The correct clunk order is clunking newdirfid first and then olddirfid next. Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 17 Oct, 2007 3 commits
-
-
Latchesar Ionkov authored
The 9P2000 protocol requires the authentication and permission checks to be done in the file server. For that reason every user that accesses the file server tree has to authenticate and attach to the server separately. Multiple users can share the same connection to the server. Currently v9fs does a single attach and executes all I/O operations as a single user. This makes using v9fs in multiuser environment unsafe as it depends on the client doing the permission checking. This patch improves the 9P2000 support by allowing every user to attach separately. The patch defines three modes of access (new mount option 'access'): - attach-per-user (access=user) (default mode for 9P2000.u) If a user tries to access a file served by v9fs for the first time, v9fs sends an attach command to the server (Tattach) specifying the user. If the attach succeeds, the user can access the v9fs tree. As there is no uname->uid (string->integer) mapping yet, this mode works only with the 9P2000.u dialect. - allow only one user to access the tree (access=<uid>) Only the user with uid can access the v9fs tree. Other users that attempt to access it will get EPERM error. - do all operations as a single user (access=any) (default for 9P2000) V9fs does a single attach and all operations are done as a single user. If this mode is selected, the v9fs behavior is identical with the current one. Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Latchesar Ionkov authored
Change the names of 'uid' and 'gid' parameters to the more appropriate 'dfltuid' and 'dfltgid'. This also sets the default uid/gid to -2 (aka nfsnobody) Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Latchesar Ionkov authored
Create more general flags field in the v9fs_session_info struct and move the 'extended' flag as a bit in the flags. Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 14 Jul, 2007 2 commits
-
-
Eric Van Hensbergen authored
This patch expands the impact of the loose cache mode to allow for cached metadata increasing the performance of directory listings and other metadata read operations. Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Latchesar Ionkov authored
This patchset moves non-filesystem interfaces of v9fs from fs/9p to net/9p. It moves the transport, packet marshalling and connection layers to net/9p leaving only the VFS related files in fs/9p. This work is being done in preparation for in-kernel 9p servers as well as alternate 9p clients (other than VFS). Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Signed-off-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
- 21 May, 2007 1 commit
-
-
Alexey Dobriyan authored
First thing mm.h does is including sched.h solely for can_do_mlock() inline function which has "current" dereference inside. By dealing with can_do_mlock() mm.h can be detached from sched.h which is good. See below, why. This patch a) removes unconditional inclusion of sched.h from mm.h b) makes can_do_mlock() normal function in mm/mlock.c c) exports can_do_mlock() to not break compilation d) adds sched.h inclusions back to files that were getting it indirectly. e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were getting them indirectly Net result is: a) mm.h users would get less code to open, read, preprocess, parse, ... if they don't need sched.h b) sched.h stops being dependency for significant number of files: on x86_64 allmodconfig touching sched.h results in recompile of 4083 files, after patch it's only 3744 (-8.3%). Cross-compile tested on all arm defconfigs, all mips defconfigs, all powerpc defconfigs, alpha alpha-up arm i386 i386-up i386-defconfig i386-allnoconfig ia64 ia64-up m68k mips parisc parisc-up powerpc powerpc-up s390 s390-up sparc sparc-up sparc64 sparc64-up um-x86_64 x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig as well as my two usual configs. Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-