linux-fsdevel mailing list

Fromsort iconSubjectDate
Lino Sanfilippo
Re: fanotify coredump issue
Hmm I could not reproduce this with the latest state (ef9bf3b7144bee6ce) of branch 'origin/for-next' from git.infradead.org/users/eparis/notify.git What i did was: - register with fanotify - set mark for OPEN_PERM event - read an event - cause a segfault before response is returned to fanotify The process terminates and the core file is created as expected. I dont think that this will work. A fanotify registration is not tracked by its pid, but by its group which may be valid ...
Jan 4, 3:28 am 2011
Arnd Bergmann
Re: [PATCH v2 3/5]add metadata_readahead ioctl in vfs
Did you notice the comment above the function? ;-) You should really add the new ioctls to compat_sys_ioctl, not to the COMPATIBLE_IOCTL() list, in order to make the behavior consistent between 32 and 64 bit user space. The main difference is that all ioctl commands that are hardcoded in the functions get called before trying to call the file system specific This should be _IOW, not _IOR. Otherwise looks good. Arnd --
Jan 4, 2:51 am 2011
Arnd Bergmann
Re: [PATCH v2 1/5] add metadata_incore ioctl in vfs
__user only makes sense on pointers. Just make this a "struct metadata_incore_ent __user *", which will also take care of the We usually try hard to avoid ioctls with indirect pointers in them. The implementation is correct (most people get this wrong), besides the extraneous __user keyword in there. Have you tried passing just a single metadata_incore_ent at the ioctl and looping in user space? I would guess the extra overhead of that would be small enough, but that might need to be ...
Jan 4, 2:40 am 2011
J. Bruce Fields
Re: [PATCH 3/4] locks: eliminate fl_mylease callback
Whoops, thanks for the reminder. Looks like we never added fl_mylease? That leaves the fl_release_private patch, updated as follows. --b. commit 3d801116bb23a1f446627ce1976950c7a126541e Author: J. Bruce Fields <bfields@redhat.com> Date: Sat Oct 30 17:41:26 2010 -0400 nfsd4: eliminate lease delete callback nfsd controls the lifetime of the lease, not the lock code, so there's no need for this callback on lease destruction. Signed-off-by: J. Bruce Fields ...
Jan 4, 11:18 am 2011
J. Bruce Fields
[PATCH 4/4] locks: minor setlease cleanup
Signed-off-by: J. Bruce Fields <bfields@redhat.com> --- fs/locks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/locks.c b/fs/locks.c index 5cb6506..feaac63 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1399,7 +1399,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) for (before = &inode->i_flock; ((fl = *before) != NULL) && IS_LEASE(fl); before = &fl->fl_next) { - if (fl->fl_file == lease->fl_file) + if (fl->fl_file == ...
Jan 3, 8:06 pm 2011
J. Bruce Fields
[PATCH 1/4] nfsd4: eliminate lease delete callback
nfsd controls the lifetime of the lease, not the lock code, so there's no need for this callback on lease destruction. Signed-off-by: J. Bruce Fields <bfields@redhat.com> --- fs/nfsd/nfs4state.c | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index b82e368..2e44ad2 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2296,23 +2296,6 @@ void nfsd_break_deleg_cb(struct file_lock *fl) } /* - ...
Jan 3, 8:06 pm 2011
J. Bruce Fields
[PATCH 3/4] locks: eliminate fl_mylease callback
The nfs server only supports read delegations for now, so we don't care how conflicts are determined. All we care is that unlocks are recognized as matching the leases they are meant to remove. After the last patch, a comparison of struct files will work for that purpose. So we no longer need this callback. Signed-off-by: J. Bruce Fields <bfields@redhat.com> --- fs/locks.c | 8 +------- fs/nfsd/nfs4state.c | 21 +-------------------- include/linux/fs.h | 1 - 3 files ...
Jan 3, 8:06 pm 2011
J. Bruce Fields
[PATCH 2/4] nfsd4: use a single struct file for delegations
When we converted to sharing struct filess between nfs4 opens I went too far and also used the same mechanism for delegations. But keeping a reference to the struct file ensures it will outlast the lease, and allows us to remove the lease with the same file as we added it. Signed-off-by: J. Bruce Fields <bfields@redhat.com> --- fs/nfsd/nfs4state.c | 10 +++++----- fs/nfsd/state.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4state.c ...
Jan 3, 8:06 pm 2011
J. Bruce Fields
remove lease callbacks
A couple lock manager calls used by the lease code look unnecessary to me; the following patches remove them. I'm planning on submitting them with the nfsd patches for 2.6.38, barring any objections. --b. --
Jan 3, 8:06 pm 2011
Christoph Hellwig
Re: [patch 8/8] fs: add i_op->sync_inode
As explained in the previous mail it's not just not writing data, it's conceptually quite different from fsync. --
Jan 4, 2:25 am 2011
Christoph Hellwig
Re: [PATCH 3/4] locks: eliminate fl_mylease callback
Please also update Documentation/filesystems/Locking for method removals. --
Jan 3, 11:07 pm 2011
Christoph Hellwig
Re: [patch 7/8] fs: fix or note I_DIRTY handling bugs in ...
I've probably done the two most complicated fsync implementations in xfs and hfsplys myself, and I'd really prefer the interface to be as simple as possible. The way the I_DIRTY_* flags and the datasync parameter to ->fsync interact are almost a receipe for getting it wrong, which in fact most implementations that tried to be smart did. See gfs2 and ocfs2 comments in this threads for classic examples. If we actually get filesystems that need to do smarts in checking/clearing the I_DIRTY_* ...
Jan 3, 11:39 pm 2011
Christoph Hellwig
Re: [patch 8/8] fs: add i_op->sync_inode
There is no problem with having a method (let's call it write_inode for simplicity, it could be sync_inode or got knows what else) to write clear the dirty state of the VFS inode asynchronously, as long as we make sure the bits are only updated once it's been successfull. That is for an async call we can't let the caller of ->write_inode update The problem is that currently we almost never do a pure blocking ->write_inode. The way the sync code is written we always do a non-blocking one ...
Jan 4, 2:25 am 2011
Christoph Hellwig
[PATCH] remove trim_fs method from Documentation/filesys ...
The ->trim_fs has been removed meanwhile, so remove it from the documentation as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Index: linux-2.6/Documentation/filesystems/Locking =================================================================== --- linux-2.6.orig/Documentation/filesystems/Locking 2011-01-04 07:08:41.296003372 +0100 +++ linux-2.6/Documentation/filesystems/Locking 2011-01-04 07:08:45.561004280 +0100 @@ -115,7 ...
Jan 3, 11:14 pm 2011
Jeff Moyer
Re: [PATCH v2 0/5] add new ioctls to do metadata readahe ...
Is it not possible to enhance the existing readahead mechanisms to work on metadata as well? Is there some reason why metadata should be fetched separately from the data it references? Cheers, Jeff --
Jan 4, 9:14 am 2011
Ryusuke Konishi
Re: [PATCH for-2.6.37 v2] update Documentation/filesyste ...
Hi Christoph, I noticed that ->trim_fs() is not present in vfs. It was removed by the commit e681c047e47c0abe ("ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard") according to the git log. Regards, --
Jan 3, 10:56 pm 2011
Ryusuke Konishi
Re: [PATCH for-2.6.37 v2] update Documentation/filesyste ...
Sorry, it was the commit 93bb41f4f8b89ac8 ("fs: Do not dispatch FITRIM through separate super_operation"). --
Jan 3, 11:04 pm 2011
Nick Piggin
Re: [patch 8/8] fs: add i_op->sync_inode
And actually I think it is much better to have sync_inode, which means we'll be able to get rid of commit_metadata (which should be an inode operation anyway, not an export operation which really should deal with exporting filesystems to a non-vfs namespace, not nfsd hacks). commit_metadata would just be sync_inode with a null range or no data sync flag set. --
Jan 4, 1:31 am 2011
Nick Piggin
Re: [patch 8/8] fs: add i_op->sync_inode
OK I missed that part about not requiring dirty metadata to be written, just currently ongoing async operations. But then I don't understand how it would be used by nfsd, how does nfsd start some async operation on the inode metadata such that ->commit_metadata would do anything useful for it? --
Jan 4, 2:52 am 2011
Shaohua Li
[PATCH v2 5/5] validate extent_buffer if it's readahead ...
do validation for extent_buffer if it's skipped before With metadata readahead, we slightly change the behavior. Before it, we allocate an extent_buffer (so set page->private), do metadata read and btree_readpage_end_io_hook() will do validation. After it, we directly do metadata readahead, and since in this case page hasn't ->private, btree_readpage_end_io_hook() will not do validation. This patch fixes this. It addes a new flag to indicate if a buffer is validated. If not and even the buffer ...
Jan 3, 10:40 pm 2011
Shaohua Li
[PATCH v2 4/5] implement metadata_ra in btrfs
Implementation btrfs .metadata_readahead. In btrfs, all metadata pages are in a special btree_inode. We do readahead in it. Signed-off-by: Shaohua Li <shaohua.li@intel.com> --- fs/btrfs/disk-io.c | 10 ++++++++++ fs/btrfs/super.c | 1 + fs/btrfs/volumes.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 2 ++ mm/readahead.c | 1 + 5 files changed, 52 insertions(+) Index: ...
Jan 3, 10:40 pm 2011
Shaohua Li
[PATCH v2 3/5]add metadata_readahead ioctl in vfs
Add metadata readahead ioctl in vfs. Filesystem can hook to super_operations.metadata_readahead to handle filesystem specific task. Next patch will give an example how btrfs implements it. Signed-off-by: Shaohua Li <shaohua.li@intel.com> --- fs/compat_ioctl.c | 1 + fs/ioctl.c | 21 +++++++++++++++++++++ include/linux/fs.h | 8 ++++++++ 3 files changed, 30 insertions(+) Index: linux/fs/ioctl.c =================================================================== --- ...
Jan 3, 10:40 pm 2011
Shaohua Li
[PATCH v2 2/5] implement metadata_incore in btrfs
Implement btrfs specific .metadata_incore. In btrfs, all metadata pages are in a special btree_inode, we take pages from it. we only account updated and referenced pages here. Say we collect metadata info in one boot, do metadata readahead in next boot and we might collect metadata again. The readahead could read garbage data in as metadata could be changed from first run. If we only account updated pages, the metadata info collected by userspace will increase every run. Btrfs alloc_extent_buffer ...
Jan 3, 10:40 pm 2011
Shaohua Li
[PATCH v2 1/5] add metadata_incore ioctl in vfs
Add an ioctl to dump filesystem's metadata in memory in vfs. Userspace collects such info and uses it to do metadata readahead. Filesystem can hook to super_operations.metadata_incore to get metadata in specific approach. Next patch will give an example how to implement .metadata_incore in btrfs. Signed-off-by: Shaohua Li <shaohua.li@intel.com> --- fs/compat_ioctl.c | 1 fs/ioctl.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/fs.h | 15 ...
Jan 3, 10:40 pm 2011
Shaohua Li
[PATCH v2 0/5] add new ioctls to do metadata readahead i ...
Hi, We have file readahead to do asyn file read, but has no metadata readahead. For a list of files, their metadata is stored in fragmented disk space and metadata read is a sync operation, which impacts the efficiency of readahead much. The patches try to add meatadata readahead for btrfs. In btrfs, metadata is stored in btree_inode. Ideally, if we could hook the inode to a fd so we could use existing syscalls (readahead, mincore or upcoming fincore) to do readahead, but the inode is ...
Jan 3, 10:40 pm 2011
previous daytodaynext day
January 3, 2011January 4, 2011None