23 Jul, 2010
4 commits
-
Workqueue can now handle high concurrency. Use system_nrt_wq
instead of slow-work.* Updated is_valid_oplock_break() to not call cifs_oplock_break_put()
as advised by Steve French. It might cause deadlock. Instead,
reference is increased after queueing succeeded and
cifs_oplock_break() briefly grabs GlobalSMBSeslock before putting
the cfile to make sure it doesn't put before the matching get is
finished.* Anton Blanchard reported that cifs conversion was using now gone
system_single_wq. Use system_nrt_wq which provides non-reentrance
guarantee which is enough and much better.Signed-off-by: Tejun Heo
Acked-by: Steve French
Cc: Anton Blanchard -
fscache no longer uses slow-work. Drop references to it.
Signed-off-by: Tejun Heo
Acked-by: David Howells -
Make fscache operation to use only workqueue instead of combination of
workqueue and slow-work. FSCACHE_OP_SLOW is dropped and
FSCACHE_OP_FAST is renamed to FSCACHE_OP_ASYNC and uses newly added
fscache_op_wq workqueue to execute op->processor().
fscache_operation_init_slow() is dropped and fscache_operation_init()
now takes @processor argument directly.* Unbound workqueue is used.
* fscache_retrieval_work() is no longer necessary as OP_ASYNC now does
the equivalent thing.* sysctl fscache.operation_max_active added to control concurrency.
The default value is nr_cpus clamped between 2 and
WQ_UNBOUND_MAX_ACTIVE.* debugfs support is dropped for now. Tracing API based debug
facility is planned to be added.Signed-off-by: Tejun Heo
Acked-by: David Howells -
Make fscache object state transition callbacks use workqueue instead
of slow-work. New dedicated unbound CPU workqueue fscache_object_wq
is created. get/put callbacks are renamed and modified to take
@object and called directly from the enqueue wrapper and the work
function. While at it, make all open coded instances of get/put to
use fscache_get/put_object().* Unbound workqueue is used.
* work_busy() output is printed instead of slow-work flags in object
debugging outputs. They mean basically the same thing bit-for-bit.* sysctl fscache.object_max_active added to control concurrency. The
default value is nr_cpus clamped between 4 and
WQ_UNBOUND_MAX_ACTIVE.* slow_work_sleep_till_thread_needed() is replaced with fscache
private implementation fscache_object_sleep_till_congested() which
waits on fscache_object_wq congestion.* debugfs support is dropped for now. Tracing API based debug
facility is planned to be added.Signed-off-by: Tejun Heo
Acked-by: David Howells
12 Jun, 2010
15 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: The file argument for fsync() is never null
Btrfs: handle ERR_PTR from posix_acl_from_xattr()
Btrfs: avoid BUG when dropping root and reference in same transaction
Btrfs: prohibit a operation of changing acl's mask when noacl mount option used
Btrfs: should add a permission check for setfacl
Btrfs: btrfs_lookup_dir_item() can return ERR_PTR
Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs
Btrfs: unwind after btrfs_start_transaction() errors
Btrfs: btrfs_iget() returns ERR_PTR
Btrfs: handle kzalloc() failure in open_ctree()
Btrfs: handle error returns from btrfs_lookup_dir_item()
Btrfs: Fix BUG_ON for fs converted from extN
Btrfs: Fix null dereference in relocation.c
Btrfs: fix remap_file_pages error
Btrfs: uninitialized data is check_path_shared()
Btrfs: fix fallocate regression
Btrfs: fix loop device on top of btrfs -
The "file" argument for fsync is never null so we can remove this check.
What drew my attention here is that 7ea8085910e: "drop unused dentry
argument to ->fsync" introduced an unconditional dereference at the
start of the function and that generated a smatch warning.Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
posix_acl_from_xattr() returns both ERR_PTRs and null, but it's OK to
pass null values to set_cached_acl()Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
If btrfs_ioctl_snap_destroy() deletes a snapshot but finishes
with end_transaction(), the cleaner kthread may come in and
drop the root in the same transaction. If that's the case, the
root's refs still == 1 in the tree when btrfs_del_root() deletes
the item, because commit_fs_roots() hasn't updated it yet (that
happens during the commit).This wasn't a problem before only because
btrfs_ioctl_snap_destroy() would commit the transaction before dropping
the dentry reference, so the dead root wouldn't get queued up until
after the fs root item was updated in the btree.Since it is not an error to drop the root reference and the root in the
same transaction, just drop the BUG_ON() in btrfs_del_root().Signed-off-by: Sage Weil
Signed-off-by: Chris Mason -
when used Posix File System Test Suite(pjd-fstest) to test btrfs,
some cases about setfacl failed when noacl mount option used.
I simplified used commands in pjd-fstest, and the following steps
can reproduce it.
------------------------
# cd btrfs-part/
# mkdir aaa
# setfacl -m m::rw aaa
Signed-off-by: Chris Mason -
On btrfs, do the following
------------------
# su user1
# cd btrfs-part/
# touch aaa
# getfacl aaa
# file: aaa
# owner: user1
# group: user1
user::rw-
group::rw-
other::r--
# su user2
# cd btrfs-part/
# setfacl -m u::rwx aaa
# getfacl aaa
# file: aaa
# owner: user1
# group: user1
user::rwx
Signed-off-by: Chris Mason -
btrfs_lookup_dir_item() can return either ERR_PTRs or null.
Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
btrfs_read_fs_root_no_name() returns ERR_PTRs on error so I added a
check for that. It's not clear to me if it can also return NULL
pointers or not so I left the original NULL pointer check as is.Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
This was added by a22285a6a3: "Btrfs: Integrate metadata reservation
with start_transaction". If we goto out here then we skip all the
unwinding and there are locks still held etc.Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
btrfs_iget() returns an ERR_PTR() on failure and not null.
Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
Unwind and return -ENOMEM if the allocation fails here.
Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
If btrfs_lookup_dir_item() fails, we should can just let the mount fail
with an error.Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
Tree blocks can live in data block groups in FS converted from extN.
So it's easy to trigger the BUG_ON.Signed-off-by: Yan Zheng
Signed-off-by: Chris Mason -
Fix a potential null dereference in relocation.c
Signed-off-by: Yan Zheng
Acked-by: Dan Carpenter
Signed-off-by: Chris Mason -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: try to send partial cap release on cap message on missing inode
ceph: release cap on import if we don't have the inode
ceph: fix misleading/incorrect debug message
ceph: fix atomic64_t initialization on ia64
ceph: fix lease revocation when seq doesn't match
ceph: fix f_namelen reported by statfs
ceph: fix memory leak in statfs
ceph: fix d_subdirs ordering problem
11 Jun, 2010
13 commits
-
when we use remap_file_pages() to remap a file, remap_file_pages always return
error. It is because btrfs didn't set VM_CAN_NONLINEAR for vma.Signed-off-by: Miao Xie
Signed-off-by: Chris Mason -
refs can be used with uninitialized data if btrfs_lookup_extent_info()
fails on the first pass through the loop. In the original code if that
happens then check_path_shared() probably returns 1, this patch
changes it to return 1 for safety.Signed-off-by: Dan Carpenter
Signed-off-by: Chris Mason -
Seems that when btrfs_fallocate was converted to use the new ENOSPC stuff we
dropped passing the mode to the function that actually does the preallocation.
This breaks anybody who wants to use FALLOC_FL_KEEP_SIZE. Thanks,Signed-off-by: Josef Bacik
Signed-off-by: Chris Mason -
We cannot use the loop device which has been connected to a file in the btrf
The reproduce steps is following:
# dd if=/dev/zero of=vdev0 bs=1M count=1024
# losetup /dev/loop0 vdev0
# mkfs.btrfs /dev/loop0
...
failed to zero device start -5The reason is that the btrfs don't implement either ->write_begin or ->write
the VFS API, so we fix it by setting ->write to do_sync_write().Signed-off-by: Miao Xie
Signed-off-by: Chris Mason -
If we have enough memory to allocate a new cap release message, do so, so
that we can send a partial release message immediately. This keeps us from
making the MDS wait when the cap release it needs is in a partially full
release message.If we fail because of ENOMEM, oh well, they'll just have to wait a bit
longer.Signed-off-by: Sage Weil
-
If we get an IMPORT that give us a cap, but we don't have the inode, queue
a release (and try to send it immediately) so that the MDS doesn't get
stuck waiting for us.Signed-off-by: Sage Weil
-
Nothing is released here: the caps message is simply ignored in this case.
Signed-off-by: Sage Weil
-
bdi_seq is an atomic_long_t but we're using ATOMIC_INIT, which causes
build failures on ia64. This patch fixes it to use ATOMIC_LONG_INIT.Signed-off-by: Jeff Mahoney
Signed-off-by: Sage Weil -
As it stands this check compares the number of pages to the page size.
This makes no sense and makes the fcntl fail in almost any sane case.Fix it by checking if nr_pages is not zero (it can become zero only if
arg is too big and round_pipe_size() overflows).Signed-off-by: Miklos Szeredi
Signed-off-by: Jens Axboe -
pipe_set_size() needs to copy pipe bufs from the old circular buffer
to the new.The current code gets this wrong in multiple ways, resulting in oops.
Test program is available here:
http://www.kernel.org/pub/linux/kernel/people/mszeredi/piperesize/Signed-off-by: Miklos Szeredi
Signed-off-by: Jens Axboe -
We do the same BUG_ON() just a line later when calling into
__bd_abort_claiming().Reported-by: Tejun Heo
Signed-off-by: Jens Axboe -
I don't like the subtle multi-context code in bd_claim (ie. detects where it
has been called based on bd_claiming). It seems clearer to just require a new
function to finish a 2-part claim.Also improve commentary in bd_start_claiming as to how it should
be used.Signed-off-by: Nick Piggin
Acked-by: Tejun Heo
Signed-off-by: Jens Axboe -
bd_start_claiming has an unbalanced module_put introduced in 6b4517a79.
Signed-off-by: Nick Piggin
Acked-by: Tejun Heo
Signed-off-by: Jens Axboe
10 Jun, 2010
1 commit
-
* 'for-2.6.35' of git://linux-nfs.org/~bfields/linux:
nfsd4: shut down callback queue outside state lock
nfsd: nfsd_setattr needs to call commit_metadata
09 Jun, 2010
3 commits
-
Now that the background flush code has been fixed, we shouldn't need to
silently multiply the wbc->nr_to_write to get good writeback. Remove
that code.Signed-off-by: Dave Chinner
Reviewed-by: Christoph Hellwig
Signed-off-by: Linus Torvalds -
This reportedly causes a lockdep warning on nfsd shutdown. That looks
like a false positive to me, but there's no reason why this needs the
state lock anyway.Reported-by: Jeff Layton
Signed-off-by: J. Bruce Fields
08 Jun, 2010
1 commit
-
* git://git.infradead.org/~dwmw2/mtd-2.6.35:
jffs2: update ctime when changing the file's permission by setfacl
jffs2: Fix NFS race by using insert_inode_locked()
jffs2: Fix in-core inode leaks on error paths
mtd: Fix NAND submenu
mtd/r852: update card detect early.
mtd/r852: Fixes in case of DMA timeout
mtd/r852: register IRQ as last step
drivers/mtd: Use memdup_user
docbook: make mtd nand module init static
06 Jun, 2010
2 commits
-
jffs2 didn't update the ctime of the file when its permission was changed.
Steps to reproduce:
# touch aaa
# stat -c %Z aaa
1275289822
# setfacl -m 'u::x,g::x,o::x' aaa
# stat -c %Z aaa
1275289822 .Signed-off-by: Jan Kara
Signed-off-by: David Woodhouse -
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags
ext4: Make sure the MOVE_EXT ioctl can't overwrite append-only files
05 Jun, 2010
1 commit
-
A few functions were still modifying i_flags in a racy manner.
Signed-off-by: Dmitry Monakhov
Signed-off-by: "Theodore Ts'o"