Re: [EXT4 set 2][PATCH 5/5] cleanups: Export jbd2-debug via debugfs

2007-07-11 Thread Mingming Cao
On Wed, 2007-07-11 at 00:38 -0500, Jose R. Santos wrote: On Tue, 10 Jul 2007 16:30:25 -0700 Andrew Morton [EMAIL PROTECTED] wrote: On Sun, 01 Jul 2007 03:36:48 -0400 Mingming Cao [EMAIL PROTECTED] wrote: On Jun 07, 2007 23:45 -0500, Jose R. Santos wrote: The jbd2-debug file

Re: [EXT4 set 1][PATCH 2/2] Enable extents by default for ext4dev

2007-07-11 Thread Mingming Cao
On Tue, 2007-07-10 at 23:35 -0400, Dave Jones wrote: On Tue, Jul 10, 2007 at 05:35:13PM -0400, Mingming Cao wrote: Sorry about this. I was using version 0.04. The latest one I can find for now is 0.05(searching lkml), but it didn't catch this codling style bug either. I appreciate if

Re: [EXT4 set 8][PATCH 1/1]Add journal checksums

2007-07-11 Thread Andrew Morton
On Sun, 01 Jul 2007 03:38:25 -0400 Mingming Cao [EMAIL PROTECTED] wrote: Journal checksum feature has been added to detect corruption of journal. That was brief. No description of what it does, how it does it, why it does it, how one operates it, why (or why not) one would choose to enable it

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread Mingming Cao
On Tue, 2007-07-10 at 22:17 -0700, Andrew Morton wrote: On Tue, 10 Jul 2007 22:09:08 -0400 Mingming Cao [EMAIL PROTECTED] wrote: David Chinneer pointed that we need to journal the version number updates together with the operations that causes the change of the inode version number, in

Re: [EXT4 set 9][PATCH 4/5]Morecleanups:ext4_extent_compilation_fixes

2007-07-11 Thread Andrew Morton
On Sun, 01 Jul 2007 03:38:51 -0400 Mingming Cao [EMAIL PROTECTED] wrote: Subject: [EXT4 set 9][PATCH 4/5]Morecleanups:ext4_extent_compilation_fixes Date: Sun, 01 Jul 2007 03:38:51 -0400 Sender: [EMAIL PROTECTED] Organization: IBM Linux Technology Center X-Mailer: Evolution 2.8.0

Re: [EXT4 set 9][PATCH 5/5]Extent micro cleanups

2007-07-11 Thread Andrew Morton
On Sun, 01 Jul 2007 03:38:59 -0400 Mingming Cao [EMAIL PROTECTED] wrote: From: Dmitry Monakhov [EMAIL PROTECTED] Subject: ext4: extent macros cleanup - Replace math equation to it's macro equivalent s/it's/its/;) - make ext4_ext_grow_indepth() indexes/leaf correct hm, what was wrong with

Re: [EXT4 set 2][PATCH 5/5] cleanups: Export jbd2-debug via debugfs

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 00:38:09 -0500 Jose R. Santos [EMAIL PROTECTED] wrote: Alternatively (and preferably) do this via an update to Documentation/filesystems/ext4.txt. Seems like I also need to update the doc on Kconfig as well. Do you prefer this in separate patches? (current patch,

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread Andrew Morton
On Tue, 10 Jul 2007 23:18:50 -0400 Mingming Cao [EMAIL PROTECTED] wrote: On Tue, 2007-07-10 at 22:17 -0700, Andrew Morton wrote: On Tue, 10 Jul 2007 22:09:08 -0400 Mingming Cao [EMAIL PROTECTED] wrote: David Chinneer pointed that we need to journal the version number updates together

Re: [PATCH 2/7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-11 Thread Amit K. Arora
On Wed, Jul 11, 2007 at 12:10:34PM +1000, Stephen Rothwell wrote: On Wed, 11 Jul 2007 01:50:00 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: --- linux-2.6.22.orig/arch/x86_64/ia32/sys_ia32.c +++ linux-2.6.22/arch/x86_64/ia32/sys_ia32.c @@ -879,3 +879,11 @@ asmlinkage long

Re: [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update

2007-07-11 Thread Christoph Hellwig
On Sun, Jul 01, 2007 at 03:37:45AM -0400, Mingming Cao wrote: This patch is on top of i_version_update_vfs. The i_version field of the inode is set on inode creation and incremented when the inode is being modified. Which is not what i_version is supposed to do. It'll get you tons of misses

[RFC/PATCH 1/5] revoke: special mmap handling

2007-07-11 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] This adds special handling for revoked memory mappings. We want to raise SIGBUS when accessing revoked mappings and return ENODEV when trying to remap with mmap(2). Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- include/linux/mm.h |1 + mm/memory.c

[RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] The revokeat(2) and frevoke(2) system calls invalidate open file descriptors and shared mappings of an inode. After an successful revocation, operations on file descriptors fail with the EBADF or ENXIO error code for regular and device files, respectively.

[RFC/PATCH 3/5] revoke: wire up i386 system calls

2007-07-11 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] Make revokeat and frevoke system calls available to user-space on i386. Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- arch/i386/kernel/syscall_table.S |2 ++ arch/x86_64/ia32/ia32entry.S |2 ++ include/asm-i386/unistd.h|4 +++- 3

[RFC/PATCH 4/5] revoke: support for ext2 and ext3

2007-07-11 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] Add revoke support to ext2, ext3 and ext4 by wiring f_ops-revoke with generic_file_revoke. Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- fs/ext2/file.c |1 + fs/ext3/file.c |1 + fs/ext4/file.c |1 + 3 files changed, 3 insertions(+) Index:

[RFC/PATCH 5/5] revoke: add documentation

2007-07-11 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] This documents revoke file operation in Documentation/filesystems/vfs.txt. Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- Documentation/filesystems/vfs.txt |5 + 1 file changed, 5 insertions(+) Index: 2.6/Documentation/filesystems/vfs.txt

Re: [PATCH 4/7][TAKE5] support new modes in fallocate

2007-07-11 Thread Christoph Hellwig
On Tue, Jul 03, 2007 at 05:16:50PM +0530, Amit K. Arora wrote: Well, if you see the modes proposed using above flags : #define FA_ALLOCATE 0 #define FA_DEALLOCATE FA_FL_DEALLOC #define FA_RESV_SPACE FA_FL_KEEP_SIZE #define FA_UNRESV_SPACE (FA_FL_DEALLOC | FA_FL_KEEP_SIZE |

Re: [PATCH 4/7][TAKE5] support new modes in fallocate

2007-07-11 Thread Christoph Hellwig
On Mon, Jul 02, 2007 at 08:55:43AM +1000, David Chinner wrote: Given the current behaviour for posix_fallocate() in glibc, I think that retaining the same error semantic and punting the cleanup to userspace (where the app will fail with ENOSPC anyway) is the only sane thing we can do here.

Re: [PATCH 4/7][TAKE5] support new modes in fallocate

2007-07-11 Thread Christoph Hellwig
On Wed, Jul 04, 2007 at 03:37:01PM +1000, Timothy Shimmin wrote: We use this capability in XFS at the moment. I think this is mainly for DMF (HSM) but is done via the xfs handle interface (xfs_open_by_handle) AFAICT. You're not :) You're using an O_INVIBLE equivalent (as described below),

Re: [PATCH 1/7] manpage for fallocate

2007-07-11 Thread Amit K. Arora
On Wed, Jul 11, 2007 at 12:37:01AM +0300, Heikki Orsila wrote: On Wed, Jul 11, 2007 at 01:48:20AM +0530, Amit K. Arora wrote: .BI int syscall(int, int fd, int mode, loff_t offset, loff_t len); Correction: int syscall(int fd, int mode, ...), Here, we have syscall() with first argument being

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Al Viro
On Wed, Jul 11, 2007 at 12:01:06PM +0300, Pekka J Enberg wrote: From: Pekka Enberg [EMAIL PROTECTED] The revokeat(2) and frevoke(2) system calls invalidate open file descriptors and shared mappings of an inode. After an successful revocation, operations on file descriptors fail with the

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Al Viro
On Wed, Jul 11, 2007 at 10:37:33AM +0100, Al Viro wrote: On Wed, Jul 11, 2007 at 12:01:06PM +0300, Pekka J Enberg wrote: From: Pekka Enberg [EMAIL PROTECTED] The revokeat(2) and frevoke(2) system calls invalidate open file descriptors and shared mappings of an inode. After an successful

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Pekka J Enberg
Hi Al, On Wed, 11 Jul 2007, Al Viro wrote: Better: I have the only opened descriptor for foo. I send it to myself as described above. I close it. revoke() is called, finds no opened instances of foo in any descriptor tables and cheerfully does nothing. I call recvmsg() and I have

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Pekka J Enberg
On Wed, 11 Jul 2007, Al Viro wrote: BTW, read() or write() in progress might get rather unhappy if your live replacement of -f_mapping races with them... For writes, we (1) never start any new operations after we've cleaned up the file descriptor tables so (2) after we're done with do_fsync()

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Al Viro
On Wed, Jul 11, 2007 at 12:50:48PM +0300, Pekka J Enberg wrote: Hi Al, On Wed, 11 Jul 2007, Al Viro wrote: Better: I have the only opened descriptor for foo. I send it to myself as described above. I close it. revoke() is called, finds no opened instances of foo in any descriptor

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Al Viro
On Wed, Jul 11, 2007 at 01:01:07PM +0300, Pekka J Enberg wrote: On Wed, 11 Jul 2007, Al Viro wrote: BTW, read() or write() in progress might get rather unhappy if your live replacement of -f_mapping races with them... For writes, we (1) never start any new operations after we've cleaned up

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-07-11 Thread Christoph Hellwig
On Thu, Jul 05, 2007 at 11:41:00AM -0400, J. Bruce Fields wrote: OK, after looking at this a little more, I'm less happy about the idea of erroring out by default: - There are a ton of filesystems that probably should allow leases, and only a few (network filesystems) that

Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs_mknod/create()

2007-07-11 Thread Christoph Hellwig
On Thu, Jul 05, 2007 at 03:43:32PM -0700, Dave Hansen wrote: This takes care of all of the direct callers of vfs_mknod(). Since a few of these cases also handle normal file creation as well, this also covers some calls to vfs_create(). So that we don't have to make three

Re: [PATCH 22/26] sys_mknodat(): elevate write count for vfs_mknod/create()

2007-07-11 Thread Christoph Hellwig
On Sat, Jul 07, 2007 at 08:25:31PM +0200, Jan Engelhardt wrote: Hm, I wonder why mknod(,S_IFDIR,) returns -EPERM rather than -EINVAL like the others? Posix. - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo

Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-07-11 Thread Christoph Hellwig
On Sat, Jun 30, 2007 at 08:56:02AM -0400, H. Peter Anvin wrote: Is that conjecture, or do you have evidence to that effect? Most users of this file are using it via the glibc interfaces, and there probably aren't all that many users of it in the first place. I have written parsers for

Re: [RFC/PATCH 2/5] revoke: core code

2007-07-11 Thread Pekka J Enberg
Hi, On Wed, 11 Jul 2007, Al Viro wrote: The fundamental issue here is that even if you do find struct file, you can't blindly rip its -f_mapping since it can be in the middle of -read(), -write(), pageout, etc. And even if you do manage that, you still have the ability to do fchmod() later.

Re: [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 22:00 -0400, Mingming Cao wrote: On Tue, 2007-07-10 at 16:30 -0700, Andrew Morton wrote: On Sun, 01 Jul 2007 03:36:56 -0400 Mingming Cao [EMAIL PROTECTED] wrote: This patch is a spinoff of the old nanosecond patches. I don't know what the old nanosecond patches

Re: [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 16:30 -0700, Andrew Morton wrote: +#define EXT4_FITS_IN_INODE(ext4_inode, einode, field) \ + ((offsetof(typeof(*ext4_inode), field) +\ + sizeof((ext4_inode)-field)) \ + = (EXT4_GOOD_OLD_INODE_SIZE + \ +

Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Woodhouse
On Wed, 2007-07-11 at 13:35 +0200, Christoph Hellwig wrote: On Tue, Jul 10, 2007 at 01:31:52AM -0700, Andrew Morton wrote: romfs-printk-format-warnings.patch NACK on this one. The rest of it is nacked anyway, until we unify the point and get_unmapped_area methods of the MTD API. -- dwmw2

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 23:34 -0400, Trond Myklebust wrote: On Wed, 2007-07-11 at 13:21 +1000, Neil Brown wrote: So my vote is to increment i_version in common code every time any change is made to the file, and alloc_inode should initialise it to current time, which might be changed by the

Re: [EXT4 set 4][PATCH 2/5] i_version: Add hi 32 bit inode version on ext4 on-disk inode

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 16:30 -0700, Andrew Morton wrote: Signed-off-by: Mingming Cao [EMAIL PROTECTED] Signed-off-by: Andreas Dilger [EMAIL PROTECTED] Signed-off-by: Kalpak Shah [EMAIL PROTECTED] --- Index: linux-2.6.21/include/linux/ext4_fs.h

Re: [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update

2007-07-11 Thread Andreas Dilger
On Jul 11, 2007 09:47 +0100, Christoph Hellwig wrote: On Sun, Jul 01, 2007 at 03:37:45AM -0400, Mingming Cao wrote: This patch is on top of i_version_update_vfs. The i_version field of the inode is set on inode creation and incremented when the inode is being modified. Which is not what

Re: [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update

2007-07-11 Thread Trond Myklebust
On Wed, 2007-07-11 at 09:47 +0100, Christoph Hellwig wrote: On Sun, Jul 01, 2007 at 03:37:45AM -0400, Mingming Cao wrote: This patch is on top of i_version_update_vfs. The i_version field of the inode is set on inode creation and incremented when the inode is being modified. Which is

fallocate, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Christoph Hellwig
fallocate-implementation-on-i86-x86_64-and-powerpc.patch fallocate-on-s390.patch fallocate-on-ia64.patch fallocate-on-ia64-fix.patch Merge. Hopefull this will be done during the 2.6.23 merge window, but right now it's not (yet). - To unsubscribe from this list: send the line unsubscribe

Re: [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update

2007-07-11 Thread Christoph Hellwig
On Wed, Jul 11, 2007 at 05:52:24AM -0600, Andreas Dilger wrote: On Jul 11, 2007 09:47 +0100, Christoph Hellwig wrote: On Sun, Jul 01, 2007 at 03:37:45AM -0400, Mingming Cao wrote: This patch is on top of i_version_update_vfs. The i_version field of the inode is set on inode creation and

Re: [EXT4 set 4][PATCH 5/5] i_version: noversion mount option to disable inode version updates

2007-07-11 Thread Christoph Hellwig
On Wed, Jul 11, 2007 at 05:57:17AM -0600, Andreas Dilger wrote: Ah, this is the patch to disable i_version updates for Lustre. I don't think any normal user would use this mount option, so I don't know if there is a need to document it. This is a reason to not merge it at all. If the only

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 16:32 -0700, Andrew Morton wrote: err = ext4_reserve_inode_write(handle, inode, iloc); + if (EXT4_I(inode)-i_extra_isize + EXT4_SB(inode-i_sb)-s_want_extra_isize + !(EXT4_I(inode)-i_state EXT4_STATE_NO_EXPAND)) { + /* We need extra buffer

Re: [EXT4 set 8][PATCH 1/1]Add journal checksums

2007-07-11 Thread Girish Shilamkar
On Tue, 2007-07-10 at 23:16 -0700, Andrew Morton wrote: On Sun, 01 Jul 2007 03:38:25 -0400 Mingming Cao [EMAIL PROTECTED] wrote: Journal checksum feature has been added to detect corruption of journal. That was brief. No description of what it does, how it does it, why it does it, how

Re: [EXT4 set 7][PATCH 1/1]Remove 32000 subdirs limit.

2007-07-11 Thread Andreas Dilger
On Jul 10, 2007 22:40 -0700, Andrew Morton wrote: On Sun, 01 Jul 2007 03:38:18 -0400 Mingming Cao [EMAIL PROTECTED] wrote: A EXT4_FEATURE_RO_COMPAT_DIR_NLINK flag has been added and it is set if the subdir count for any directory crosses 65000. Would I be correct in assuming that a later

Re: [EXT4 set 8][PATCH 1/1]Add journal checksums

2007-07-11 Thread Andreas Dilger
On Jul 11, 2007 17:16 +0530, Girish Shilamkar wrote: + if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) { + jbd2_journal_set_features(sbi-s_journal, + JBD2_FEATURE_COMPAT_CHECKSUM, 0, + JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT); + } else if

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread Dave Kleikamp
On Wed, 2007-07-11 at 15:05 +1000, Neil Brown wrote: It just occurred to me: If i_version is 64bit, then knfsd would need to be careful when reading it on a 32bit host. What are the locking rules? How does knfsd use i_version? I would think that if all it was doing was to compare

Re: [RFC PATCH 1/1] VFS: Augment /proc/mount with subroot and shared-subtree

2007-07-11 Thread Ram Pai
On Wed, 2007-07-11 at 11:24 +0100, Christoph Hellwig wrote: On Sat, Jun 30, 2007 at 08:56:02AM -0400, H. Peter Anvin wrote: Is that conjecture, or do you have evidence to that effect? Most users of this file are using it via the glibc interfaces, and there probably aren't all that many

Re: [EXT4 set 4][PATCH 5/5] i_version: noversion mount option to disable inode version updates

2007-07-11 Thread Theodore Tso
On Tue, Jul 10, 2007 at 04:31:44PM -0700, Andrew Morton wrote: On Sun, 01 Jul 2007 03:37:53 -0400 Mingming Cao [EMAIL PROTECTED] wrote: Add a noversion mount option to disable inode version updates. Why is this option being offered to our users? To reduce disk traffic, like noatime?

Re: -mm merge plans for 2.6.23

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 12:39:42 +0100 David Woodhouse [EMAIL PROTECTED] wrote: On Wed, 2007-07-11 at 13:35 +0200, Christoph Hellwig wrote: On Tue, Jul 10, 2007 at 01:31:52AM -0700, Andrew Morton wrote: romfs-printk-format-warnings.patch NACK on this one. The rest of it is nacked

Re: -mm merge plans for 2.6.23

2007-07-11 Thread Randy Dunlap
On Wed, 11 Jul 2007 10:21:03 -0700 Andrew Morton wrote: On Wed, 11 Jul 2007 12:39:42 +0100 David Woodhouse [EMAIL PROTECTED] wrote: On Wed, 2007-07-11 at 13:35 +0200, Christoph Hellwig wrote: On Tue, Jul 10, 2007 at 01:31:52AM -0700, Andrew Morton wrote:

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 01:21:55PM +1000, Neil Brown wrote: And just by-the-way, the server doesn't really have the option of not sending the attribute. If i_version isn't defined, it has to fake something using mtime, and hope that is good enough. ctime, actually--the change attribute is

Re: [EXT4 set 8][PATCH 1/1]Add journal checksums

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 07:01:08 -0600 Andreas Dilger [EMAIL PROTECTED] wrote: - /* AKPM: buglet - add `i' to tmp! */ Damn. After, what, seven years, someone actually fixed it? for (i = 0; i bh-b_size; i += 512) { - journal_header_t *tmp =

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 06:10:56 -0600 Andreas Dilger [EMAIL PROTECTED] wrote: On Jul 10, 2007 16:32 -0700, Andrew Morton wrote: err = ext4_reserve_inode_write(handle, inode, iloc); + if (EXT4_I(inode)-i_extra_isize + EXT4_SB(inode-i_sb)-s_want_extra_isize +

Re: [EXT4 set 2][PATCH 3/5] cleanups: set_jbd2_64bit_feature for 16TB ext4 fs

2007-07-11 Thread Jose R. Santos
Set the journals JBD2_FEATURE_INCOMPAT_64BIT on devices with more than 32bit block sizes during mount time. This ensure proper record lenth when writing to the journal. Signed-off-by: Jose R. Santos [EMAIL PROTECTED] Signed-off-by: Andreas Dilger [EMAIL PROTECTED] Signed-off-by: Mingming Cao

Re: [EXT4 set 2][PATCH 5/5] cleanups: Export jbd2-debug via debugfs

2007-07-11 Thread Jose R. Santos
The jbd2-debug file used to be located in /proc/sys/fs/jbd2-debug, but create_proc_entry() does not do lookups on file names that are more that one directory deep. This causes the entry creation to fail and hence, no proc file is created. Instead of fixing this on procfs might as well move the

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-11 Thread Kalpak Shah
On Wed, 2007-07-11 at 10:34 -0700, Andrew Morton wrote: On Wed, 11 Jul 2007 06:10:56 -0600 Andreas Dilger [EMAIL PROTECTED] wrote: On Jul 10, 2007 16:32 -0700, Andrew Morton wrote: err = ext4_reserve_inode_write(handle, inode, iloc); + if (EXT4_I(inode)-i_extra_isize

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 09:28:06AM -0500, Dave Kleikamp wrote: On Wed, 2007-07-11 at 15:05 +1000, Neil Brown wrote: It just occurred to me: If i_version is 64bit, then knfsd would need to be careful when reading it on a 32bit host. What are the locking rules? How does knfsd use

Re: [dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md.

2007-07-11 Thread Ric Wheeler
[EMAIL PROTECTED] wrote: On Tue, 10 Jul 2007 14:39:41 EDT, Ric Wheeler said: All of the high end arrays have non-volatile cache (read, on power loss, it is a promise that it will get all of your data out to permanent storage). You don't need to ask this kind of array to drain the cache. In

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 11:20:18AM +0100, Christoph Hellwig wrote: On Thu, Jul 05, 2007 at 11:41:00AM -0400, J. Bruce Fields wrote: OK, after looking at this a little more, I'm less happy about the idea of erroring out by default: - There are a ton of filesystems that probably should

[PATCH 00/23] Mount writer count API (read-only bind mounts prep)

2007-07-11 Thread Dave Hansen
The most contentious part of the r/o bind mount patches is actually implementing the count tracking. It has NUMA and SMP implications, and is going to need to have a whole discussion on that one patch. These patches, on the other hand, simply introduce a new API: mnt_want_write() and

[PATCH 01/23] rearrange may_open() to be r/o friendly

2007-07-11 Thread Dave Hansen
may_open() calls vfs_permission() before it does checks for IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). The check inside of vfs_permission() is going away eventually. With the mnt_want/drop_write() functions, all of the r/o checks (except for this one) are consistently done

[PATCH 02/23] create cleanup helper svc_msnfs()

2007-07-11 Thread Dave Hansen
I'm going to be modifying nfsd_rename() shortly to support read-only bind mounts. This #ifdef is around the area I'm patching, and it starts to get really ugly if I just try to add my new code by itself. Using this little helper makes things a lot cleaner to use. Signed-off-by: Dave Hansen

[PATCH 04/23] r/o bind mounts: stub functions

2007-07-11 Thread Dave Hansen
This patch adds two function mnt_want_write() and mnt_drop_write(). These are used like a lock pair around and fs operations that might cause a write to the filesystem. Before these can become useful, we must first cover each place in the VFS where writes are performed with a want/drop pair.

[PATCH 12/23] elevate mount count for extended attributes

2007-07-11 Thread Dave Hansen
This basically audits the callers of xattr_permission(), which calls permission() and can perform writes to the filesystem. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/nfsd/nfs4proc.c |7 ++- lxc-dave/fs/xattr.c | 16 ++-- 2 files changed, 20

[PATCH 11/23] elevate write count for link and symlink calls

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c | 10 ++ 1 file changed, 10 insertions(+) diff -puN fs/namei.c~elevate-write-count-for-link-and-symlink-calls fs/namei.c --- lxc/fs/namei.c~elevate-write-count-for-link-and-symlink-calls 2007-07-10

[PATCH 13/23] elevate write count for file_update_time()

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/inode.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff -puN fs/inode.c~elevate-write-count-for-file_update_time fs/inode.c --- lxc/fs/inode.c~elevate-write-count-for-file_update_time 2007-07-10

[PATCH 14/23] mount_is_safe(): add comment

2007-07-11 Thread Dave Hansen
This area of code is currently #ifdef'd out, so add a comment for the time when it is actually used. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namespace.c |4 1 file changed, 4 insertions(+) diff -puN fs/namespace.c~mount-is-safe-add-comment fs/namespace.c ---

[PATCH 09/23] elevate mnt writers for callers of vfs_mkdir()

2007-07-11 Thread Dave Hansen
Pretty self-explanatory. Fits in with the rest of the series. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c|5 + lxc-dave/fs/nfsd/nfs4recover.c |4 2 files changed, 9 insertions(+) diff -puN

[PATCH 15/23] unix_find_other() elevate write count for touch_atime()

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/net/unix/af_unix.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff -puN net/unix/af_unix.c~unix-find-other-elevate-write-count-for-touch-atime net/unix/af_unix.c ---

[PATCH 16/23] elevate write count over calls to vfs_rename()

2007-07-11 Thread Dave Hansen
This also uses the little helper in the NFS code to make an if() a little bit less ugly. We introduced the helper at the beginning of the series. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c|4 lxc-dave/fs/nfsd/vfs.c | 15 +++ 2 files

[PATCH 18/23] elevate writer count for do_sys_truncate()

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/open.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff -puN fs/open.c~elevate-writer-count-for-do-sys-truncate fs/open.c --- lxc/fs/open.c~elevate-writer-count-for-do-sys-truncate 2007-07-10

[PATCH 20/23] elevate write count for do_sys_utime() and touch_atime()

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/inode.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff -puN fs/inode.c~elevate-write-count-for-do-sys-utime-and-touch-atime fs/inode.c ---

[PATCH 21/23] sys_mknodat(): elevate write count for vfs_mknod/create()

2007-07-11 Thread Dave Hansen
This takes care of all of the direct callers of vfs_mknod(). Since a few of these cases also handle normal file creation as well, this also covers some calls to vfs_create(). So that we don't have to make three mnt_want/drop_write() calls inside of the switch statement, we move some of its logic

[PATCH 23/23] do_rmdir(): elevate write count

2007-07-11 Thread Dave Hansen
Elevate the write count during the vfs_rmdir() call. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c |5 + 1 file changed, 5 insertions(+) diff -puN fs/namei.c~do-rmdir-elevate-write-count fs/namei.c --- lxc/fs/namei.c~do-rmdir-elevate-write-count 2007-07-10

[PATCH 22/23] elevate mnt writers for vfs_unlink() callers

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/namei.c |4 lxc-dave/ipc/mqueue.c |5 - 2 files changed, 8 insertions(+), 1 deletion(-) diff -puN fs/namei.c~elevate-mnt-writers-for-vfs-unlink-callers fs/namei.c ---

[PATCH 19/23] elevate write count for do_utimes()

2007-07-11 Thread Dave Hansen
Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/utimes.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff -puN fs/utimes.c~elevate-write-count-for-do-utimes fs/utimes.c --- lxc/fs/utimes.c~elevate-write-count-for-do-utimes 2007-07-10

[PATCH 10/23] elevate write count during entire ncp_ioctl()

2007-07-11 Thread Dave Hansen
Some ioctls need write access, but others don't. Make a helper function to decide when write access is needed, and take it. Signed-off-by: Dave Hansen [EMAIL PROTECTED] --- lxc-dave/fs/ncpfs/ioctl.c | 55 +- 1 file changed, 54 insertions(+), 1

[PATCH 08/23] make access() use mnt check

2007-07-11 Thread Dave Hansen
It is OK to let access() go without using a mnt_want/drop_write() pair because it doesn't actually do writes to the filesystem, and it is inherently racy anyway. This is a rare case when it is OK to use __mnt_is_readonly() directly. Signed-off-by: Dave Hansen [EMAIL PROTECTED] ---

[PATCH 06/23] r/o bind mounts: elevate write count for some ioctls

2007-07-11 Thread Dave Hansen
Some ioctl()s can cause writes to the filesystem. Take these, and make them use mnt_want/drop_write() instead. We need to pass the filp one layer deeper in XFS, but somebody _just_ pulled it out in February because nobody was using it, so I don't feel guilty for adding it back. Signed-off-by:

[PATCH 03/23] filesystem helpers for custom 'struct file's

2007-07-11 Thread Dave Hansen
Christoph H. says this stands on its own and can go in before the rest of the r/o bind mount set. --- Some filesystems forego the vfs and may_open() and create their own 'struct file's. This patch creates a couple of helper functions which can be used by these filesystems, and will provide a

[PATCH 05/23] elevate write count open()'d files

2007-07-11 Thread Dave Hansen
This is the first really tricky patch in the series. It elevates the writer count on a mount each time a non-special file is opened for write. This is not completely apparent in the patch because the two if() conditions in may_open() above the mnt_want_write() call are, combined, equivalent to

Re: [EXT4 set 9][PATCH 5/5]Extent micro cleanups

2007-07-11 Thread Mingming Cao
On Tue, 2007-07-10 at 23:20 -0700, Andrew Morton wrote: On Sun, 01 Jul 2007 03:38:59 -0400 Mingming Cao [EMAIL PROTECTED] wrote: From: Dmitry Monakhov [EMAIL PROTECTED] Subject: ext4: extent macros cleanup - Replace math equation to it's macro equivalent s/it's/its/;) Okay. -

block_page_mkwrite? (Re: fault vs invalidate race (Re: -mm merge plans for 2.6.23))

2007-07-11 Thread David Chinner
On Thu, Jul 12, 2007 at 10:54:57AM +1000, Nick Piggin wrote: Andrew Morton wrote: The fault-vs-invalidate race fix. I have belatedly learned that these need more work, so their state is uncertain. The more work may turn out being too much for you (although it is nothing exactly tricky

Re: block_page_mkwrite? (Re: fault vs invalidate race (Re: -mm merge plans for 2.6.23))

2007-07-11 Thread Nick Piggin
David Chinner wrote: On Thu, Jul 12, 2007 at 10:54:57AM +1000, Nick Piggin wrote: Andrew Morton wrote: The fault-vs-invalidate race fix. I have belatedly learned that these need more work, so their state is uncertain. The more work may turn out being too much for you (although it is

[PATCH 1 of 2] block_page_mkwrite V2

2007-07-11 Thread David Chinner
Generic page_mkwrite functionality. Filesystems that make use of the VM -page_mkwrite() callout will generally use the same core code to implement it. There are several tricky truncate-related issues that we need to deal with here as we cannot take the i_mutex as we normally would for these

[PATCH 2 of 2] Make XFS use block_page_mkwrite

2007-07-11 Thread David Chinner
Implement -page_mkwrite in XFS. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- fs/xfs/linux-2.6/xfs_file.c | 16 1 file changed, 16 insertions(+) Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_file.c === ---

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread Andreas Dilger
On Jul 11, 2007 16:04 -0400, J. Bruce Fields wrote: A 32-bit i_version could in theory wrap pretty quickly, couldn't it? That's not a problem in itself--the problem would only arise if two subsequent client queries of the change attribute happened a multiple of 2^32 i_version increments

[PATCH, RESEND] Teach do_mpage_readpage() about unwritten buffers

2007-07-11 Thread David Chinner
Teach do_mpage_readpage() about unwritten extents so we can always map them in get_blocks rather than they are are holes on read. Allows setup_swap_extents() to use preallocated files on XFS filesystems for swap files without ever needing to convert them. Signed-Off-By: Dave Chinner [EMAIL