15 Jun, 2006
1 commit
-
This patch fixes the way we have been dealing with unlinked,
but still open files. It removes all limits (other than memory
for inodes, as per every other filesystem) on numbers of these
which we can support on GFS2. It also means that (like other
fs) its the responsibility of the last process to close the file
to deallocate the storage, rather than the person who did the
unlinking. Note that with GFS2, those two events might take place
on different nodes.Also there are a number of other changes:
o We use the Linux inode subsystem as it was intended to be
used, wrt allocating GFS2 inodes
o The Linux inode cache is now the point which we use for
local enforcement of only holding one copy of the inode in
core at once (previous to this we used the glock layer).
o We no longer use the unlinked "special" file. We just ignore it
completely. This makes unlinking more efficient.
o We now use the 4th block allocation state. The previously unused
state is used to track unlinked but still open inodes.
o gfs2_inoded is no longer needed
o Several fields are now no longer needed (and removed) from the in
core struct gfs2_inode
o Several fields are no longer needed (and removed) from the in core
superblockThere are a number of future possible optimisations and clean ups
which have been made possible by this patch.Signed-off-by: Steven Whitehouse
10 Jun, 2006
1 commit
-
Here's a patch which add 32/64 bit compat to the DLM IOs and tidies the
structures for alignment.As it causes an ABI change I had few qualms about adding the extra flag for
"is64bit" as it simply uses a byte that would have been padding.Cc: David Woodhouse
Signed-off-by: Patrick Caulfield
Signed-off-by: Steven Whitehouse
07 Jun, 2006
2 commits
-
The caller ensures that ea_list_i() is never called with an
invalid type, so lets BUG() if we see one. This clears up
a couple of compiler warnings too.Signed-off-by: Steven Whitehouse
-
We can reclaim some space by moving fields in some structures
in order to allow them to pack better on 64 bit architectures.Signed-off-by: Steven Whitehouse
06 Jun, 2006
2 commits
-
From: Trond Myklebust
We're presently running lock_kernel() under fs_lock via nfs's ->permission
handler. That's a ranking bug and sometimes a sleep-in-spinlock bug. This
problem was introduced in the openat() patchset.We should not need to hold the current->fs->lock for a codepath that doesn't
use current->fs.[vsu@altlinux.ru: fix error path]
Signed-off-by: Trond Myklebust
Cc: Al Viro
Signed-off-by: Sergey Vlasov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jun, 2006
1 commit
-
From: Andrew Morton
Spotted by Jan Capek
Cc: "Stephen C. Tweedie"
Cc: Andreas Dilger
Cc: Jan Capek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 May, 2006
7 commits
-
on set size to zero.
Signed-off-by: Sebastian Voitzsch
Signed-off-by: Steve French -
Signed-off-by: Steve French
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Steve French -
Signed-off-by: Steve French
-
Wasn't able to reproduce a hard hang, but was able to get an oops if
suspended the machine during a copy to the cifs mount. This led to some
things hanging, including a "sync". Also got I/O errors when trying to
access the mount afterwards (even when didn't see the oops), and had
to unmount and remount in order to access the filesystem.This patch fixed the oops.
Signed-off-by: Dave Kleikamp
Signed-off-by: Steve French -
during mount. Especially important for some non-Western languages.
Signed-off-by: Steve French
-
Signed-off-by: Steve French
27 May, 2006
1 commit
-
If affs_bread() fails, the exit path calls mark_buffer_dirty_inode() with a
NULL argument.Coverity CID: 312.
Signed-off-by: Florin Malita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 May, 2006
3 commits
-
Change names of local_nodeid to dlm_local_nodeid to prevent a
namespace collision. Changed other local variable to match.Cc: David Teigland
Signed-off-by: Steven Whitehouse -
This should fix the mount problems with gfs2 and selinux.
Signed-off-by: Ryan O'Hara
Signed-off-by: Steven Whitehouse
24 May, 2006
5 commits
-
Signed-off-by: Steven Whitehouse
-
Signed-off-by: David Teigland
Signed-off-by: Steven Whitehouse -
It looks like metapage_releasepage was making in invalid assumption that
the releasepage method would not be called on a dirty page. Instead of
issuing a warning and releasing the metapage, it should return 0, indicating
that the private data for the page cannot be released.I also realized that metapage_releasepage had the return code all wrong. If
it is successful in releasing the private data, it should return 1, otherwise
it needs to return 0.Lastly, there is no need to call wait_on_page_writeback, since
try_to_release_page will not call us with a page in writback state.Signed-off-by: Dave Kleikamp
-
Else a subsequent bio_clone might make a mess.
Signed-off-by: Neil Brown
Cc: "Don Dupuis"
Acked-by: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Both cause the 'entries' count in the export cache to be non-zero at module
removal time, so unregistering that cache fails and results in an oops.1/ exp_pseudoroot (used for NFSv4 only) leaks a reference to an export
entry.
2/ sunrpc_cache_update doesn't increment the entries count when it adds
an entry.Thanks to "david m. richter" for triggering the
problem and finding one of the bugs.Cc: "david m. richter"
Signed-off-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 May, 2006
8 commits
-
Signed-off-by: Steven Whitehouse
-
This adds support to GFS2 for selinux extended attributes. There is a
known bug in gfs2_ea_get() which is believed to be independant of this
patch. Further patches will follow once that bug is fixed in order to
make GFS2 use as much of the generic eattr infrastructure as possible.Signed-off-by: Ryan O'Hara
Signed-off-by: Steven Whitehouse -
Don't reassign to watch. If idr_find() returns NULL, then
put_inotify_watch() will choke.Signed-off-by: Amy Griffis
Cc: John McCutchan
Cc: Robert Love
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
While doing some inotify stress testing, I hit the following race. In
inotify_release(), it's possible for a watch to be removed from the lists
in between dropping dev->mutex and taking inode->inotify_mutex. The
reference we hold prevents the watch from being freed, but not from being
removed.Checking the dev's idr mapping will prevent a double list_del of the
same watch.Signed-off-by: Amy Griffis
Acked-by: John McCutchan
Cc: Robert Love
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Bernd Schmidt points out that binfmt_flat is now leaving the exec file open
while the application runs. This offsets all the application's fd numbers.
We should have closed the file within exec(), not at exit()-time.But there doesn't seem to be a lot of point in doing all this just to avoid
going over RLIMIT_NOFILE by one fd for a few microseconds. So take the EMFILE
checking out again. This will cause binfmt_flat to again fail LTP's
exec-should-return-EMFILE-when-fdtable-is-full test. That test appears to be
wrong anyway - Open Group specs say nothing about exec() returning EMFILE.Cc: Bernd Schmidt
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Assigning the result of posix_acl_to_xattr() to an unsigned data type
(size/size_t) obscures possible errors.Coverity CID: 1206.
Signed-off-by: Florin Malita
Acked-by: NeilBrown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Address a problem found when a Linux NFS server uses the "subtree_check"
export option.The "subtree_check" NFS export option was designed to prohibit a client
from using a file handle for which it should not have permission. The
algorithm used is to ensure that the entire path to the file being
referenced is accessible to the user attempting to use the file handle. If
some part of the path is not accessible, then the operation is aborted and
the appropriate version of ESTALE is returned to the NFS client.The error, ESTALE, is unfortunate in that it causes NFS clients to make
certain assumptions about the continued existence of the file. They assume
that the file no longer exists and refuse to attempt to access it again.
In this case, the file really does exist, but access was denied by the
server for a particular user.A better error to return would be an EACCES sort of error. This would
inform the client that the particular operation that it was attempting was
not allowed, without the nasty side effects of the ESTALE error.Signed-off-by: Peter Staubach
Acked-By: NeilBrown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Functions compat_nfs_svc_trans, compat_nfs_clnt_trans,
compat_nfs_exp_trans, compat_nfs_getfd_trans and compat_nfs_getfs_trans,
which are called by compat_sys_nfsservctl(fs/compat.c), don't handle the
return value of access_ok properly. access_ok return 1 when the addr is
valid, and 0 when it's not, but these functions have the reversed
understanding. When the address is valid, they always return -EFAULT to
compat_sys_nfsservctl.An example is to run /usr/sbin/rpc.nfsd(32bit program on Power5). It
doesn't function as expected. strace showes that nfsservctl returns
-EFAULT.The patch fixes this by correcting the error handling on the return value
of access_ok in the five functions.Signed-off-by: Lin Feng Shen
Cc: Trond Myklebust
Acked-by: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 May, 2006
8 commits
-
Setup the lock_dlm kobject before setting up the dlm lockspace instead
of after. We want to use the sysfs files to detect the mount without
having to wait for the dlm setup which can take a while.Signed-off-by: David Teigland
Signed-off-by: Steven Whitehouse -
This adds some extra debugging to glock.c and changes
inode.c's deallocation code to call the debugging code
at a suitable moment. I'm chasing down a particular bug
to do with deallocation at the moment and the code can
go again once the bug is fixed.Also this includes the first part of some changes to unify
the Linux struct inode and GFS2's struct gfs2_inode. This
transformation will happen in small parts over the next short
period.Signed-off-by: Steven Whitehouse
-
Signed-off-by: Steven Whitehouse
-
We no longer use semaphores, everything has been converted to
mutex or rwsem, so we don't need to include this header any more.Signed-off-by: Steven Whitehouse
-
This patch drops the log spinlock when an I/O error occurs
to avoid any possible problems in case of blocking or
recursion in the I/O error routine. It also has a few
cosmetic changes to tidy up various other files.Signed-off-by: Steven Whitehouse
-
Signed-off-by: Steven Whitehouse
-
The functions moved from bits.c can now be made static.
Signed-off-by: Steven Whitehouse
-
Since they are small and will be inlined by the complier,
it makes sense to merge the contents of bits.[ch] into
rgrp.cSigned-off-by: Steven Whitehouse
18 May, 2006
1 commit
-
configfs_init() needs to be called first to register configfs before anyconsumers try to access it. Move up configfs in fs/Makefile to make
sure it is initialized early.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh