An error occurred fetching the project authors.
- 04 Jul, 2003 2 commits
-
-
Trond Myklebust authored
- Make the VFS pass the struct nameidata as an optional parameter to the permission() inode operation. - Patch may_create()/may_open() so it passes the struct nameidata from vfs_create()/open_namei() as an argument to permission(). - Add an intent flag for the sys_access() function.
-
Trond Myklebust authored
- Make the VFS pass the struct nameidata as an optional argument to the create inode operation. - Patch vfs_create() to take a struct nameidata as an optional argument.
-
- 20 Jun, 2003 1 commit
-
-
Andrew Morton authored
From: Peter Chubb <peter@chubb.wattle.id.au> Add two new system calls, statfs64 and fstatfs64. This has been needed sincew the 64-bit sector_t merge - the current structures will overflow. - Use a common interface (vfs_statfs) with the rest of the kernel, - convert to 32-bit at (f)statfs time. - New field f_frsize gives underlying fragment size for the filesystem. (Solaris has this, and the Open Group describe it). - The old statfs syscalls will now return -EOVERFLOW if the device was too large to be represented inthe old data structures. The new system calls take a size_t argument, which is the size of the structure to be filled in (as requested by Ben LaHaise), to `futureproof' the interface. Has been reviewed by the arch maintainers and by Ulrich Drepper.
-
- 17 Jun, 2003 2 commits
-
-
Neil Brown authored
From: "William A.(Andy) Adamson" <andros@citi.umich.edu> When readdir is enumerating a directory and finds a mountpoint, it needs to do a bit of extra work to find the filehandle to be returned in the readdir reply. It is even possible that finding the filehandle requires an up-call, so the request might be dropped to be re-tried later.
-
Neil Brown authored
The most significant fix is cleaning up properly when nfs service is stopped. Also fix some refcounting problems and other little bits.
-
- 07 May, 2003 1 commit
-
-
Andrew Morton authored
From: Stewart Smith <stewartsmith@mac.com> Remove the UPDATE_ATIME() macro, use update_atime() directly.
-
- 12 Apr, 2003 1 commit
-
-
Neil Brown authored
Currently, an NFSv3 ACCESS check for READ permission on an eXecute-only file will succeed where it should fail. This is because nfsd_permission allows READ access to eXecute only files so that mode 711 executables can be loaded and run, and nfsd_access simply uses nfsd_permission. This patch changes nfsd_permission to only map eXecute permission to read permission of MAY_OWNER_OVERRIDE was set. This is only set when trying to read from a file, so ACCESS will no longer be tricked. This change will only affect callers of nfsd_permission that specify MAY_READ and not MAY_OWNER_OVERRIDE, and nfsd_access is the only routine that calls nfsd_permission (via fh_verify) that way.
-
- 03 Apr, 2003 1 commit
-
-
Andrew Morton authored
The big SMP machines are seeing quite some contention in dnotify_parent() (via vfs_write). This function is hammering the global dparent_lock. However we don't actually need a global dparent_lock for pinning down dentry->d_parent. We can use dentry->d_lock for this. That is already being held across d_move. This patch speeds up SDET on the 16-way by 5% and wipes dnotify_parent() off the profiles. It also uninlines dnofity_parent(). It also uses spin_lock(), which is faster than read_lock(). I'm not sure that we need to take both the source and target dentry's d_lock in d_move. The patch also does lots of s/__inline__/inline/ in dcache.h
-
- 18 Mar, 2003 1 commit
-
-
Andrew Morton authored
Patch from Andreas Gruenbacher <agruen@suse.de> In both 2.5 and 2.4, the fs/nfsd/vfs.c:nfsd_symlink() function calls down to notify_change(). If notify_change fails for some reason, the error code is not converted to an nfs no-the-wire error code as is should. The attached patches fix that (one for 2.4, the other for 2.5).
-
- 14 Mar, 2003 2 commits
-
-
Neil Brown authored
Now that we have working up-calls to userspace, CROSSMNT makes sense. If CROSSMNT is set for an export, and we too a LOOKUP which crosses a mountpoint, we initiate an upcall to find out if and how that filesystem is exported.
-
Neil Brown authored
becase nohide is the user-space visible name for the flag, and we are about to define a real CROSSMNT.
-
- 16 Jan, 2003 1 commit
-
-
Stephen D. Smalley authored
This patch adds a security_file_alloc call to init_private_file and creates a close_private_file function to encapsulate the release of private file structures. These changes ensure that security structures for private files will be allocated and freed appropriately. Per Andi Kleen's comments, the patch also renames init_private_file to open_private_file to force updating of all callers, since they will also need to be updated to use close_private_file to avoid a leak of the security structure. Per Christoph Hellwig's comments, the patch also replaces the 'mode' argument with a 'flags' argument, computing the f_mode from the flags, and it explicitly tests f_op prior to dereferencing, as in dentry_open().
-
- 10 Jan, 2003 1 commit
-
-
Neil Brown authored
Currently nfsd only worries about read-only exports for directories and files, which allows device special files to be chmodded (for example). This patch extends the test to cover all files, but is careful to avoid it when an IRIX client is doing an write-permission test against a pre-existing device special file.
-
- 01 Jan, 2003 1 commit
-
-
Christoph Hellwig authored
fs.h only needs the forward-declaration of struct statfs
-
- 21 Nov, 2002 1 commit
-
-
Andries E. Brouwer authored
The i_dev field is deleted and the few uses are replaced by i_sb->s_dev. There is a single side effect: a stat on a socket now sees a nonzero st_dev. There is nothing against that - FreeBSD has a nonzero value as well - but there is at least one utility (fuser) that will need an update.
-
- 19 Nov, 2002 1 commit
-
-
Matthew Wilcox authored
Al pointed out that the current name of get_lease is extremely confusing and I agree. This (a) renames it to break_lease and (b) fixes a bug noticed by Dave Hansen which could cause a NULL pointer dereference under high load.
-
- 17 Nov, 2002 1 commit
-
-
Andi Kleen authored
stat64 has been changed to return jiffies granuality as nsec in previously unused fields. This allows make to make better decisions on when to recompile a file. Follows losely the Solaris API. CURRENT_TIME has been redefined to return struct timespec. The users who don't use it in a inode/attr context have been changed to use a new get_seconds() function. CURRENT_TIME is implemented by an out-of-line function. There is a small performance penalty in this patch. The previous filemap code had an optimization to flush atime only once a second. This is currently gone, which will increase flushes a bit. I believe the correct solution if it should be a problem is to have per super block fields that give an arbitary atime flush granuality - so that you can set it to be only flushed once a hour if you prefer that. I will work on that later in separate patches if the need should arise. struct inode and the attr struct has been changed to store struct timespec instead of time_t for [cma]time. Not all file systems support this granuality, but some like XFS,NFSv3,CIFS,JFS do. The others will currently truncate the nsec part on flushing to disk. There was some discussion on this rounding on l-k previously. I went for simple truncation because there is not much evidence IMHO that the more complicated roundings have any advantages. In practice application will be rather unlikely to notice the rounding anyways - they can only see a difference when an inode is flush from memory and reloaded in less than a second, which is rather unlikely.
-
- 16 Nov, 2002 1 commit
-
-
Linus Torvalds authored
NFSD users that got it implicitly before.
-
- 09 Nov, 2002 1 commit
-
-
Hirokazu Takahashi authored
I enhanced the sendfile method so that we could pass a proper actor to it (which exposes the full power of the internal implementation). Now knfsd calls the sendfile vector rather than depending on a readpage() that hasn't been set up fully.
-
- 07 Nov, 2002 1 commit
-
-
Christoph Hellwig authored
Clean up vfs_readv/writev() interface and avoid code duplication. Make kNFSd use the cleaned-up interfaces, and disable the code that accesses the low-level readpage() function of the exported filesystem (not allowed - many filesystems need extra setup, which is why we have a separate ->sendpage() routine for that).
-
- 06 Nov, 2002 1 commit
-
-
Neil Brown authored
From Hirokazu Takahashi <taka@valinux.co.jp> This patch changes read and readdir in nfsd. read: If the file supports readpage, we use it to collect pages out of the page cache and to attache them directly to the outgoing nfs reply. The reduces the number of copies by one, and if the filesystem/device driver didn't copy the data, and if the network card can support not copying the data, then you get zero-copy reads. readdir: A separate page is used for stoing the readdir response so that a fill PAGE_SIZE bytes of reply can be supported.
-
- 30 Oct, 2002 2 commits
-
-
Neil Brown authored
This means: 1/ We don't need an order-4 allocation for each nfsd that starts 2/ We don't need an order-4 allocation in skb_linearize when we receive a 32K write request 3/ It will be easier to incorporate the zero-copy read changes The pages are handed around using an xdr_buf (instead of svc_buf) much like the NFS client so future crypto code can use the same data structure for both client and server. The code assumes that most requests and replies fit in a single page. The exceptions are assumed to have some largish 'data' bit, and the rest must fit in a single page. The 'data' bits are file data, readdir data, and symlinks. There must be only one 'data' bit per request. This is all fine for nfs/nlm. This isn't complete: 1/ NFSv4 hasn't been converted yet (it won't compile) 2/ NFSv3 allows symlinks upto 4096, but the code will only support upto about 3800 at the moment 3/ readdir responses are limited to about 3800. but I thought that patch was big enough, and the rest can come later. This patch introduces vfs_readv and vfs_writev as parallels to vfs_read and vfs_write. This means there is a fair bit of duplication in read_write.c that should probably be tidied up...
-
Neil Brown authored
nfsd_readdir - the common readdir code for all version of nfsd, contains a number of version-specific things with appropriate checks, and also does some xdr-encoding which rightly belongs elsewhere. This patch simplifies nfsd_readdir to do just the core stuff, and moves the version specifics into version specific files, and the xdr encoding into xdr encoding files.
-
- 16 Oct, 2002 2 commits
-
-
Christoph Hellwig authored
Switch knfsd to vfs_read/vfs_write to work on aio-only filesystems. This also gets stuff like the LSM checks and mandatory lock checking for free.
-
Christoph Hellwig authored
o don't define __NO_VERSION__ (no use in 2.4/2.5) o don't include <linux/version.h>
-
- 11 Oct, 2002 4 commits
-
-
Neil Brown authored
cache.c gets code to allow a 'request' to be referred pending an update of a cache item, and revisited when the item is updates. svcsock.c gets code to store the relevant part of a request on deferral, and to re-queue it when the cache item that caused the deferral is filled in.
-
Neil Brown authored
Rather than possibly modifying a request (as xdr_decode_string can) we use xdr_decode_string_inplace to symlink contents. This string may not be nul terminated (though it often is) so in the 'unlikely' event that is isn't nul terminated, we copy it into a kmalloced space first. It might be nice if vfs_symlink took a length, but then every filesystem would have to as well....
-
Neil Brown authored
This introduces two caches, svc_export_cache (nfsd.exports) and svc_expkey_cache (nfsd.fh). nfsd.exports maps client+directory -> export options. nfsd.fh maps client + filehandle-fragment -> directory. A major part of this change is that export entries are now reference counted, so we have to be careful to keep those counts correct.
-
Neil Brown authored
Instead of doing the lookup from ipaddr to domain inside the nfs server, (and also when lockd calls into nfsd) it is now done at the rpc authentication level which is a more sensible place for it. Note that both AUTH_UNIX and AUTH_NULL do the same lookup. So that the rpc layer knows that nfsd and lockd both uses the name space of domains (while other hypothetical services may not) we introduce a 'class' for each service which svc_auth combines with the IP address when doing a lookup.
-
- 12 Sep, 2002 1 commit
-
-
Neil Brown authored
Currently get_parent (needed to find the exportpoint above a given dentry) walks the hash table of export points checking each with is_subdir. Now it walks up the d_parent link checking each for membership in the hashtable. nfsd_lookup currently does that walk too (when crossing a mountpoint backwards) so the code gets unified. This approach makes more sense as we move towards a cache for export information that can be filled on demand. It also assumes less about the hash table (which will change).
-
- 30 Aug, 2002 1 commit
-
-
Andrew Morton authored
This is a performance and correctness fix against the writeback paths. The writeback code has competing requirements. Sometimes it is used for "memory cleansing": kupdate, bdflush, writer throttling, page allocator writeback, etc. And sometimes this same code is used for data integrity pruposes: fsync, msync, fdatasync, sync, umount, various other kernel-internal uses. The problem is: how to handle a dirty buffer or page which is currently under writeback. For memory cleansing, we just want to skip that buffer/page and go onto the next one. But for sync, we must wait on the old writeback and then start new writeback. mpage_writepages() is current correct for cleansing, but incorrect for sync. block_write_full_page() is currently correct for sync, but inefficient for cleansing. The fix is fairly simple. - In mpage_writepages(), don't skip the page is it's a sync operation. - In block_write_full_page(), skip the buffer if it is a sync operation. And return -EAGAIN to tell the caller that the writeout didn't work out. The caller must then set the page dirty again and move it onto mapping->dirty_pages. This is an extension of the writepage API: writepage can now return EAGAIN. There are only three callers, and they have been updated. fail_writepage() and ext3_writepage() were actually doing this by hand. They have been changed to return -EAGAIN. NTFS will want to be able to return -EAGAIN from its writepage as well. - A sticky question is: how to tell the writeout code which mode it is operating in? Cleansing or sync? It's such a tiny code change that I didn't have the heart to go and propagate a `mode' argument down every instance of writepages() and writepage() in the kernel. So I passed it in via current->flags. Incidentally, the occurrence of a locked-and-dirty buffer in block_write_full_page() is fairly rare: normally the collision avoidance happens at the address_space level, via PageWriteback. But some mappings (blockdevs, ext3 files, etc) have their dirty buffers written out via submit_bh(). It is these buffers which can stall block_write_full_page(). This wart will be pretty intrusive to fix. ext3 needs to become fully page-based (ugh. It's a block-based journalling filesystem, and pages are unnatural). blockdev mappings are still written out by buffers because that's how filesystems use them. Putting _all_ metadata (indirects, inodes, superblocks, etc) into standalone address_spaces would fix that up. - filemap_fdatawrite() sets PF_SYNC. So filemap_fdatawrite() is the kernel function which will start writeback against a mapping for "data integrity" purposes, whereas the unexported, internal-only do_writepages() is the writeback function which is used for memory cleansing. This difference is the reason why I didn't consolidate those functions ages ago... - Lots of code paths had a bogus extra call to filemap_fdatawait(), which I previously added in a moment of weak-headedness. They have all been removed.
-
- 23 Aug, 2002 6 commits
-
-
Kendrick M. Smith authored
This patch makes three small changes to nfsd_readdir(). First, the 'filldir' routine for NFSv4 may return an arbitrary error, which should become the return value for nfsd_readdir(). I implemented this by adding an 'nfserr' field to the 'struct readdir_cd'. Second, in NFSv4 the caller of nfsd_readdir() will specify an attribute bitmap, which must be communicated to the 'filldir' routine. I implemented this by adding a @bitmap parameter to nfsd_readdir() and a corresponding field in the 'struct readdir_cd'. (The bitmap is not interpreted in any way by nfsd_readdir().) Finally, NFSv4 defines a new error nfserr_readdir_nospc, which indicates that there was not enough buffer space to encode a single entry.
-
Kendrick M. Smith authored
NFSv4 defines a new field in the ACCESS response: a bitmap to indicate which access bits requested by the client are "supported", i.e. meaningful for the object in question. This patch adds a new parameter @supported to nfsd_access(), so that nfsd_access() can set the value of this bitmap.
-
Kendrick M. Smith authored
File creation in NFSv4 is almost the same as in NFSv3, with one minor difference. If an UNCHECKED create is done, and the file exists, we don't set any attributes. Exception: If size==0 is specified as part of the attributes, then we do truncate the file, but only after processing the rest of the OPEN. (File creation is always part of an OPEN request.) This patch defines a new argument *truncp to nfsd_create_v3(), which will be NULL for v3 requests. For v4 requests, it will point to a variable which should be set to 1 if file truncation is still needed. The logic in nfsd_create_v3() is changed as follows: If - *truncp is not NULL - the create is UNCHECKED - the file exists then nfsd_create_v3() returns immediately. If size==0 is specified, then *truncp is set to 1. This is kind of a hack, but the only alternative I could see was creating a new routine nfsd_create_v4(), which would be identical to nfsd_create_v3() except for this point.
-
Kendrick M. Smith authored
If nfsd_unlink() is called with @type equal to 0, then let it do the right thing regardless of the type of the file being unlinked. This is needed for the NFSv4 REMOVE operation, which works for any type of file, even directories.
-
Kendrick M. Smith authored
Sanity check COMMIT arguments by ensuring that (start)+(length) < 2^64. The check is done in a way which is free of signedness pathologies in all cases. This change was inspired by pynfs, Peter Astrand's regression testsuite for NFSv4 servers. The change is necessary for all of the COMMIT tests to pass. However, it's a little open to debate whether the change is really needed. I'm curious to hear the opinions of other developers.
-
Kendrick M. Smith authored
In a few places on the server, I had to change code that looked like: if (rqstp->rq_vers == 3) /* NFSv3 behavior */ else /* NFSv2 behavior */ to: if (rqstp->rq_vers > 2) /* NFSv3 behavior */ else /* NFSv2 behavior */ so that we would get the NFSv3 behavior, not the NFSv2 behavior, in NFSv4. This patch collects all changes of this type.
-
- 04 Jul, 2002 1 commit
-
-
Alexander Viro authored
* ->i_dev followed the example of ->s_dev - it's dev_t now. All remaining uses of ->i_dev either outright want dev_t (stat()) or couldn't care less (printing major:minor in /proc/<pid>/maps, etc.)
-
- 22 May, 2002 1 commit
-
-
Christoph Hellwig authored
Currently fs.h is full of unrelated declarations and included in almost any source file. Thus it makes sense to spilt certain aspects out that are only used by few users. This patch starts with the namei/path lookup interface and splits it into <linux/namei.h> which is now directly included by the 24 files that actually need it.
-
- 20 May, 2002 1 commit
-
-
Christoph Hellwig authored
The lock.h header contained some hand-crafted lcoking routines from the pre-SMP days. In 2.5 only lock_super/unlock_super are left, guarded by a number of completly unrelated (!) includes. This patch moves lock_super/unlock_super to fs.h, which defined struct super_block that is needed for those to operate it, removes locks.h and updates all caller to not include it and add the missing, previously nested includes where needed.
-