23 Apr, 2006
1 commit
-
reiserfs_cache_default_acl() should return whether we successfully found
the acl or not. We have to return correct value even if reiserfs_get_acl()
returns error code and not just 0. Otherwise callers such as
reiserfs_mkdir() can unnecessarily lock the xattrs and later functions such
as reiserfs_new_inode() fail to notice that we have already taken the lock
and try to take it again with obvious consequences.Signed-off-by: Jan Kara
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Mar, 2006
1 commit
-
This adds support for the sys_splice system call. Using a pipe as a
transport, it can connect to files or sockets (latter as output only).From the splice.c comments:
"splice": joining two ropes together by interweaving their strands.
This is the "extended pipe" functionality, where a pipe is used as
an arbitrary in-memory buffer. Think of a pipe as a small kernel
buffer that you can use to transfer data from one end to the other.The traditional unix read/write is extended with a "splice()" operation
that transfers data buffers to or from a pipe buffer.Named by Larry McVoy, original implementation from Linus, extended by
Jens to support splicing to files and fixing the initial implementation
bugs.Signed-off-by: Jens Axboe
Signed-off-by: Linus Torvalds
29 Mar, 2006
1 commit
-
This is a conversion to make the various file_operations structs in fs/
const. Basically a regexp job, with a few manual fixupsThe goal is both to increase correctness (harder to accidentally write to
shared datastructures) and reducing the false sharing of cachelines with
things that get dirty in .data (while .rodata is nicely read only and thus
cache clean)Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Mar, 2006
3 commits
-
Now that get_block() can handle mapping multiple disk blocks, no need to have
->get_blocks(). This patch removes fs specific ->get_blocks() added for DIO
and makes it users use get_block() instead.Signed-off-by: Badari Pulavarty
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Increase the size of the buffer_head b_size field (only) for 64 bit platforms.
Update some old and moldy comments in and around the structure as well.The b_size increase allows us to perform larger mappings and allocations for
large I/O requests from userspace, which tie in with other changes allowing
the get_block_t() interface to map multiple blocks at once.Signed-off-by: Nathan Scott
Signed-off-by: Badari Pulavarty
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The return value of this function is never used, so let's be honest and
declare it as void.Some places where invalidatepage returned 0, I have inserted comments
suggesting a BUG_ON.[akpm@osdl.org: JBD BUG fix]
[akpm@osdl.org: rework for git-nfs]
[akpm@osdl.org: don't go BUG in block_invalidate_page()]
Signed-off-by: Neil Brown
Acked-by: Dave Kleikamp
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Mar, 2006
7 commits
-
fs/reiserfs/item_ops.c: In function 'indirect_print_item':
fs/reiserfs/item_ops.c:278: warning: 'num' may be used uninitialized in this function(akpm: this is probably just gcc being dumb)
Signed-off-by: Benoit Boissinot
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The Coverity checker wasn't happy seeing a size_t compared with -ENODATA
and -ENOSYS.Since the only place where size is set is through the result of
reiserfs_xattr_get() which is an int, we could simply make size an int.Signed-off-by: Adrian Bunk
Cc: Jeff Mahoney
Cc: Chris Mason
Cc: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use the new balance_dirty_pages_ratelimited_nr in reiserfs "largeio" file
write.Signed-off-by: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Clean up several places where gcc issues warnings when -W is specified.
Thanks to Neil for finding that.Signed-off-by: Vladimir V. Saveliev
Cc: Neil Brown
Signed-off-by: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When an error occurs in reiserfs_file_write before any data is written, and
O_SYNC is set, the return code of generic_osync_write will overwrite the
error code, losing it.This patch ensures that generic_osync_inode() doesn't run under an error
condition, losing the error. This duplicates the logic from
generic_file_buffered_write().Signed-off-by: Jeff Mahoney
Cc: Chris Mason
Cc: Jeff Mahoney
Cc: Alexander Zarochentsev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reiserfs does not handle transaction ID overflow correctly. Transaction ID
== 0 causes reiserfs to crash. The patch fixes all places where the
transaction ID is incremented.Signed-off-by: Alexander Zarochentsev
Signed-off-by: Hans Reiser
Cc: Chris Mason
Cc: Jeff Mahoney
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch fixes a bug in reiserfs truncate. A transaction might overflow
when truncating long highly fragmented file. The fix is to split
truncation into several transactions to avoid overflowing.Signed-off-by: Vladimir V. Saveliev
Cc; Charles McColgan
Cc: Alexander Zarochentsev
Cc: Hans Reiser
Cc: Chris Mason
Cc: Jeff Mahoney
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Mar, 2006
3 commits
-
Rewrap the overly long source code lines resulting from the previous
patch's addition of the slab cache flag SLAB_MEM_SPREAD. This patch
contains only formatting changes, and no function change.Signed-off-by: Paul Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Mark file system inode and similar slab caches subject to SLAB_MEM_SPREAD
memory spreading.If a slab cache is marked SLAB_MEM_SPREAD, then anytime that a task that's
in a cpuset with the 'memory_spread_slab' option enabled goes to allocate
from such a slab cache, the allocations are spread evenly over all the
memory nodes (task->mems_allowed) allowed to that task, instead of favoring
allocation on the node local to the current cpu.The following inode and similar caches are marked SLAB_MEM_SPREAD:
file cache
==== =====
fs/adfs/super.c adfs_inode_cache
fs/affs/super.c affs_inode_cache
fs/befs/linuxvfs.c befs_inode_cache
fs/bfs/inode.c bfs_inode_cache
fs/block_dev.c bdev_cache
fs/cifs/cifsfs.c cifs_inode_cache
fs/coda/inode.c coda_inode_cache
fs/dquot.c dquot
fs/efs/super.c efs_inode_cache
fs/ext2/super.c ext2_inode_cache
fs/ext2/xattr.c (fs/mbcache.c) ext2_xattr
fs/ext3/super.c ext3_inode_cache
fs/ext3/xattr.c (fs/mbcache.c) ext3_xattr
fs/fat/cache.c fat_cache
fs/fat/inode.c fat_inode_cache
fs/freevxfs/vxfs_super.c vxfs_inode
fs/hpfs/super.c hpfs_inode_cache
fs/isofs/inode.c isofs_inode_cache
fs/jffs/inode-v23.c jffs_fm
fs/jffs2/super.c jffs2_i
fs/jfs/super.c jfs_ip
fs/minix/inode.c minix_inode_cache
fs/ncpfs/inode.c ncp_inode_cache
fs/nfs/direct.c nfs_direct_cache
fs/nfs/inode.c nfs_inode_cache
fs/ntfs/super.c ntfs_big_inode_cache_name
fs/ntfs/super.c ntfs_inode_cache
fs/ocfs2/dlm/dlmfs.c dlmfs_inode_cache
fs/ocfs2/super.c ocfs2_inode_cache
fs/proc/inode.c proc_inode_cache
fs/qnx4/inode.c qnx4_inode_cache
fs/reiserfs/super.c reiser_inode_cache
fs/romfs/inode.c romfs_inode_cache
fs/smbfs/inode.c smb_inode_cache
fs/sysv/inode.c sysv_inode_cache
fs/udf/super.c udf_inode_cache
fs/ufs/super.c ufs_inode_cache
net/socket.c sock_inode_cache
net/sunrpc/rpc_pipe.c rpc_inode_cacheThe choice of which slab caches to so mark was quite simple. I marked
those already marked SLAB_RECLAIM_ACCOUNT, except for fs/xfs, dentry_cache,
inode_cache, and buffer_head, which were marked in a previous patch. Even
though SLAB_RECLAIM_ACCOUNT is for a different purpose, it marks the same
potentially large file system i/o related slab caches as we need for memory
spreading.Given that the rule now becomes "wherever you would have used a
SLAB_RECLAIM_ACCOUNT slab cache flag before (usually the inode cache), use
the SLAB_MEM_SPREAD flag too", this should be easy enough to maintain.
Future file system writers will just copy one of the existing file system
slab cache setups and tend to get it right without thinking.Signed-off-by: Paul Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted.Signed-off-by: Tobias Klauser
Cc: David Howells
Cc: Dave Kleikamp
Acked-by: Trond Myklebust
Cc: Neil Brown
Cc: Chris Mason
Cc: Jeff Mahoney
Cc: Christoph Hellwig
Cc: Nathan Scott
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Mar, 2006
2 commits
-
The bitmaps associated with generation numbers for directory entries
are declared as an array of ints. On some platforms, this causes alignment
exceptions.The following patch uses the standard bitmap declaration macros to
declare the bitmaps, fixing the problem.Originally from Takashi Iwai.
Signed-off-by: Takashi Iwai
Acked-by: Jeff Mahoney
Signed-off-by: Linus Torvalds -
This patch fixes bugs in reiserfs where unsigned integers were checked
whether they are less then 0.Signed-off-by: Vladimir V. Saveliev
Cc: Neil Brown
Signed-off-by: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Feb, 2006
1 commit
-
This fixes a potential oops if there is an error reported by
posix_acl_from_disk(). This is mostly theoretical due to the use of
magics and checksums in xattrs, but is still possible.Signed-off-by: Jeff Mahoney
Signed-off-by: Linus Torvalds
13 Feb, 2006
1 commit
-
Unfortunately, the reiserfs_attrs_cleared bit in the superblock flag can
lie. File systems have been observed with the bit set, yet still contain
garbage in the stat data field, causing unpredictable results.This patch backs out the enable-by-default behavior.
It eliminates the changes from: d50a5cd860ce721dbeac6a4f3c6e42abcde68cd8,
and ef5e5414e7a83eb9b4295bbaba5464410b11e030.Signed-off-by: Jeff Mahoney
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Feb, 2006
1 commit
-
A bunch of asm/bug.h includes are both not needed (since it will get
pulled anyway) and bogus (since they are done too early). Removed.Signed-off-by: Al Viro
04 Feb, 2006
1 commit
-
Signed-off-by: Hans Reiser
Signed-off-by: Vitaly Fertman
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Feb, 2006
10 commits
-
When a filesystem has been converted from 3.5.x to 3.6.x, we need an extra
check during file write to make sure we are not trying to make a 3.5.x file
> 2GB.Signed-off-by: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
reiserfs: journal_transaction_should_end should increase the count of
blocks allocated so the transaction subsystem can keep new writers from
creating a transaction that is too large.Signed-off-by: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
write_ordered_buffers should handle dirty non-uptodate buffers without a
BUG()Signed-off-by: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In data=journal mode, reiserfs writepage needs to make sure not to trigger
transactions while being run under PF_MEMALLOC. This patch makes sure to
redirty the page instead of forcing a transaction start in this case.Also, calling filemap_fdata* in order to trigger io on the block device can
cause lock inversions on the page lock. Instead, do simple batching from
flush_commit_list.Signed-off-by: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
After a transaction has closed but before it has finished commit, there is
a window where data=ordered mode requires invalidatepage to pin pages
instead of freeing them. This patch fixes a race between the
invalidatepage checks and data=ordered writeback, and it also adds a check
to the reiserfs write_ordered_buffers routines to write any anonymous
buffers that were dirtied after its first writeback loop.That bug works like this:
proc1: transaction closes and a new one starts
proc1: write_ordered_buffers starts processing data=ordered list
proc1: buffer A is cleaned and written
proc2: buffer A is dirtied by another process
proc2: File is truncated to zero, page A goes through invalidatepage
proc2: reiserfs_invalidatepage sees dirty buffer A with reiserfs
journal head, pins it
proc1: write_ordered_buffers frees the journal head on buffer AAt this point, buffer A stays dirty forever
Signed-off-by: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use the generic_permission code with a proper wrapper and callback instead
of having a local copy.Signed-off-by: Christoph Hellwig
Cc: Jeff Mahoney
Cc: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This function is completely unused since the xattr permission checking
changes. Remove it and fold __reiserfs_permission into
reiserfs_permission.Signed-off-by: Christoph Hellwig
Cc: Jeff Mahoney
Cc: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
According to http://bugzilla.kernel.org/show_bug.cgi?id=5778
fs/reiserfs/file.c is missing this check.Signed-off-by: Diego Calleja
Cc: Jeff Mahoney
Cc: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch replaces yield and retry loop with __GFP_NOFAIL in
alloc_journal_list().Signed-off-by: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove kmalloc() wrapper from fs/reiserfs/. Please note that a reiserfs
/proc entry format is changed because kmalloc statistics is removed.Signed-off-by: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jan, 2006
1 commit
-
Remove redundant NULL check in reiserfs_lookup() as d_splice_alias() can take
NULL inode as input.Signed-off-by: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jan, 2006
2 commits
-
fs: Use where capable() is used.
Signed-off-by: Randy Dunlap
Acked-by: Tim Schmielau
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Sometimes we call do_journal_end() with t_refcount == 0. If quota is
turned on and we happen to have some inode with preallocation bad things
happen as we try to use the current handle for quota operations. Checks
for t_refcount in journal_begin() fail and we Oops. We raise t_refcount to
make those checks happy. We should not cause any bad as all the needed
quota blocks should be already attached to the transaction (they were
attached to the transaction when we allocated those preallocation blocks).Signed-off-by: Jan Kara
Cc: Jeff Mahoney
Cc: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2006
2 commits
-
To allow various options to work per-mount instead of per-sb we need a
struct vfsmount when updating ctime and mtime. This preparation patch
replaces the inode_update_time routine with a file_update_atime routine so
we can easily get at the vfsmount. (and the file makes more sense in this
context anyway). Also get rid of the unused second argument - we always
want to update the ctime when calling this routine.Signed-off-by: Christoph Hellwig
Cc: Al Viro
Cc: Anton Altaparmakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
remove checks now in the VFS
Signed-off-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Jan, 2006
1 commit
-
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.Modified-by: Ingo Molnar
(finished the conversion)
Signed-off-by: Jes Sorensen
Signed-off-by: Ingo Molnar
03 Jan, 2006
1 commit
-
As everyone knows, the rule is: "i before e.. um.. always."
Signed-off-by: Matt Mackall
Signed-off-by: Adrian Bunk
15 Dec, 2005
1 commit
-
The following patch fixes a bug where if the journal is aborted, it can
leave a transaction open. The result will be a BUG when another code
path attempts to start a transaction and will get a "nesting into
different fs" error, since current->journal_info will be left non-NULL.Original fix against SUSE kernel by Chris Mason
Signed-off-by: Jeff Mahoney
Signed-off-by: Linus Torvalds