Re: [RFC][PATCH] Secure Deletion and Trash-Bin Support for Ext4

2006-12-04 Thread David Chinner
On Mon, Dec 04, 2006 at 01:33:55PM -0500, Nikolai Joukov wrote: As we promised on the linux-ext4 list on October 31, here is the patch that adds secure deletion via a trash-bin functionality for ext4. It is a compromise solution that combines secure deletion with the trash-bin support (the

Re: [RFC][PATCH] Secure Deletion and Trash-Bin Support for Ext4

2006-12-06 Thread David Chinner
On Tue, Dec 05, 2006 at 11:41:28AM -0500, Nikolai Joukov wrote: As we promised on the linux-ext4 list on October 31, here is the patch that adds secure deletion via a trash-bin functionality for ext4. It is a compromise solution that combines secure deletion with the trash-bin

Re: Re: NFSv4/pNFS possible POSIX I/O API standards

2006-12-06 Thread David Chinner
On Tue, Dec 05, 2006 at 05:47:16PM +0100, Latchesar Ionkov wrote: On 12/5/06, Rob Ross [EMAIL PROTECTED] wrote: Hi, I agree that it is not feasible to add new system calls every time somebody has a problem, and we don't take adding system calls lightly. However, in this case we're talking

Re: openg and path_to_handle

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 09:53:39AM -0600, Rob Ross wrote: David Chinner wrote: On Tue, Dec 05, 2006 at 05:47:16PM +0100, Latchesar Ionkov wrote: On 12/5/06, Rob Ross [EMAIL PROTECTED] wrote: Hi, I agree that it is not feasible to add new system calls every time somebody has a problem

Re: openg and path_to_handle

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 10:20:23AM -0600, Rob Ross wrote: Matthew Wilcox wrote: On Wed, Dec 06, 2006 at 09:53:39AM -0600, Rob Ross wrote: David Chinner wrote: Does anyone here know about the XFS libhandle API? This has been around for years and it does _exactly_ what these proposed syscalls

Re: openg and path_to_handle

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 02:50:49PM -0600, Rob Ross wrote: David Chinner wrote: On Wed, Dec 06, 2006 at 09:53:39AM -0600, Rob Ross wrote: David Chinner wrote: Does anyone here know about the XFS libhandle API? This has been around for years and it does _exactly_ what these proposed syscalls

Re: openg and path_to_handle

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 01:50:24PM -0700, Matthew Wilcox wrote: On Thu, Dec 07, 2006 at 07:40:05AM +1100, David Chinner wrote: Permission checks are done on the path_to_handle(), so in reality only root or CAP_SYS_ADMIN users can currently use the open_by_handle interface because

Re: [RFC][PATCH] Secure Deletion and Trash-Bin Support for Ext4

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 07:56:19PM -0500, Josef Sipek wrote: On Wed, Dec 06, 2006 at 08:11:00PM +1100, David Chinner wrote: They are defined but unused in 2.6.19, right? I can't see anywhere in the 2.6.19 ext2/3/4/reiser trees that actually those flags, including setting and retrieving them

Re: [RFC][PATCH] Secure Deletion and Trash-Bin Support for Ext4

2006-12-06 Thread David Chinner
On Wed, Dec 06, 2006 at 09:35:30PM -0500, Josef Sipek wrote: On Thu, Dec 07, 2006 at 12:44:27PM +1100, David Chinner wrote: Maybe we should be using EAs for this sort of thing instead of flags on the inode? If we keep adding inode flags for generic features then we are going to force more

[PATCH] Make BH_Unwritten a first class bufferhead flag

2007-01-08 Thread David Chinner
Currently, XFS uses BH_PrivateStart for flagging unwritten extent state in a bufferhead. Recently, i found the long standing mmap/unwritten extent conversion bug, and it was to do with partial page invalidation not clearing the unwritten flag from bufferheads attached to the page but beyond EOF.

Re: [PATCH] Make BH_Unwritten a first class bufferhead flag

2007-01-08 Thread David Chinner
On Mon, Jan 08, 2007 at 10:54:02PM +, Christoph Hellwig wrote: this doesn't look like a full first class flag to me yet. Don't we need to check for buffer_unwritten in the places we're checking for buffer_delay so we can stop setting buffer_delay for unwritten buffers? That would be

[PATCH 1 of 2]: Make BH_Unwritten a first class bufferhead flag V2

2007-01-09 Thread David Chinner
Version 2: - separate buffer_delay in generic code into buffer_delay and buffer_unwritten - include XFS changes as a second patch: - remove XFS use of buffer_delay to indicate buffer_unwritten - remove XFS hack to silently clear lost unwritten flags Version 1: Currently, XFS uses

[PATCH 2 of 2]: Make XFS use BH_Unwritten and BH_Delay correctly

2007-01-09 Thread David Chinner
Don't hide buffer_unwritten behind buffer_delay() and remove the hack that clears unexpected buffer_unwritten() states now that it can't happen. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- fs/xfs/linux-2.6/xfs_aops.c | 3 --- 1 file changed, 29 deletions(-) Index:

[RFC] Implement -page_mkwrite for XFS

2007-02-06 Thread David Chinner
Folks, I'm not sure of the exact locking rules and constraints for -page_mkwrite(), so I thought I better fish around for comments. With XFS, we need to hook pages being dirtied by mmap writes so that we can attach buffers of the correct state tothe pages. This means that when we write them

Re: [patch 0/3] 2.6.20 fix for PageUptodate memorder problem

2007-02-06 Thread David Chinner
On Tue, Feb 06, 2007 at 09:02:01AM +0100, Nick Piggin wrote: Still no independent confirmation as to whether this is a problem or not. I think it is, so I'll propose this patchset to fix it. Patch 1/3 has a reasonable description of the problem. Nick, can you include a diffstat at the head

Re: [RFC] Implement -page_mkwrite for XFS

2007-02-07 Thread David Chinner
On Wed, Feb 07, 2007 at 10:18:23AM +, Christoph Hellwig wrote: This looks to me. But given that this is generic code except for the get_block callback, shouldn't we put the guts into buffer.c and wire all filesystems up to use it? e.g. int block_page_mkwrite(struct vm_area_struct

[PATCH 1 of 2] Implement generic block_page_mkwrite() functionality

2007-02-07 Thread David Chinner
On Christoph's suggestion, take the guts of the proposed xfs_vm_page_mkwrite function and implement it as a generic core function as it used no specific XFS code at all. This allows any filesystem to easily hook the -page_mkwrite() VM callout to allow them to set up pages dirtied by mmap writes

[PATCH 1 of 2] Implement XFS -page_mkwrite() callout

2007-02-07 Thread David Chinner
Use the generic block_page_mkrite() to implement the XFS -page_mkwrite() callout. 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: [PATCH 1 of 2] Implement generic block_page_mkwrite() functionality

2007-02-07 Thread David Chinner
Mental Note: must remember to refresh patch after fixing compile errors. New patch attached. - On Christoph's suggestion, take the guts of the proposed xfs_vm_page_mkwrite function and implement it as a generic core function as it used no specific XFS code at all. This allows any filesystem to

Re: [PATCH 1 of 2] Implement generic block_page_mkwrite() functionality

2007-02-07 Thread David Chinner
On Wed, Feb 07, 2007 at 01:00:28PM +, Hugh Dickins wrote: On Wed, 7 Feb 2007, David Chinner wrote: On Christoph's suggestion, take the guts of the proposed xfs_vm_page_mkwrite function and implement it as a generic core function as it used no specific XFS code at all. This allows

Re: [PATCH 1 of 2] Implement generic block_page_mkwrite() functionality

2007-02-07 Thread David Chinner
On Wed, Feb 07, 2007 at 03:56:15PM +, Hugh Dickins wrote: On Thu, 8 Feb 2007, David Chinner wrote: On Wed, Feb 07, 2007 at 01:00:28PM +, Hugh Dickins wrote: I'm worried about concurrent truncation. Isn't it the case that i_mutex is held when prepare_write and commit_write

Re: [PATCH 1 of 2] Implement generic block_page_mkwrite() functionality

2007-02-08 Thread David Chinner
On Thu, Feb 08, 2007 at 08:11:00AM -0500, Chris Mason wrote: On Thu, Feb 08, 2007 at 09:50:13AM +1100, David Chinner wrote: You don't need to lock out all truncation, but you do need to lock out truncation of the page in question. Instead of your i_size checks, check page-mapping isn't

Re: Fix(es) for ext2 fsync bug

2007-02-14 Thread David Chinner
On Wed, Feb 14, 2007 at 11:54:54AM -0800, Valerie Henson wrote: Just some quick notes on possible ways to fix the ext2 fsync bug that eXplode found. Whether or not anyone will bother to implement it is another matter. Background: The eXplode file system checker found a bug in ext2 fsync

Re: Fix(es) for ext2 fsync bug

2007-02-14 Thread David Chinner
On Wed, Feb 14, 2007 at 03:26:22PM -0600, Dave Kleikamp wrote: On Thu, 2007-02-15 at 07:31 +1100, David Chinner wrote: On Wed, Feb 14, 2007 at 11:54:54AM -0800, Valerie Henson wrote: Just some quick notes on possible ways to fix the ext2 fsync bug that eXplode found. Whether

Re: [RFC] The many faces of the I_LOCK

2007-02-21 Thread David Chinner
On Wed, Feb 21, 2007 at 01:09:56PM +, Jörn Engel wrote: 1. Introduction This lengthy investigation was caused by a deadlock problem in LogFS, but uncovered a more general problem. It affects, at the least, all filesystems that need to read inodes in their write path. To my knowledge,

Re: [patch 3/8] per backing_dev dirty and writeback page accounting

2007-03-11 Thread David Chinner
On Tue, Mar 06, 2007 at 07:04:46PM +0100, Miklos Szeredi wrote: From: Andrew Morton [EMAIL PROTECTED] [EMAIL PROTECTED]: bugfix] Miklos Szeredi [EMAIL PROTECTED]: Changes: - updated to apply after clear_page_dirty_for_io() race fix This is needed for - balance_dirty_pages()

Re: [patch 3/8] per backing_dev dirty and writeback page accounting

2007-03-12 Thread David Chinner
On Mon, Mar 12, 2007 at 12:40:47PM +0100, Miklos Szeredi wrote: I have no idea how serious the scalability problems with this are. If they are serious, different solutions can probably be found for the above, but this is certainly the simplest. Atomic operations to a single

Re: [patch 3/8] per backing_dev dirty and writeback page accounting

2007-03-12 Thread David Chinner
On Mon, Mar 12, 2007 at 11:36:16PM +0100, Miklos Szeredi wrote: I'll try to explain the reason for the deadlock first. Ah, thanks for that. IIUC, your problem is that there's another bdi that holds all the dirty pages, and this throttle loop never flushes pages from that other bdi and we

Re: [patch 3/8] per backing_dev dirty and writeback page accounting

2007-03-13 Thread David Chinner
On Tue, Mar 13, 2007 at 09:21:59AM +0100, Miklos Szeredi wrote: read request sys_write mutex_lock(i_mutex) ... balance_dirty_pages submit write requests loop ... write requests completed ... dirty still over limit ... ... loop forever Hmmm -

Re: [RFC] Heads up on sys_fallocate()

2007-03-13 Thread David Chinner
On Tue, Mar 06, 2007 at 10:46:56AM -0600, Eric Sandeen wrote: Ulrich Drepper wrote: Christoph Hellwig wrote: fallocate with the whence argument and flags is already quite complicated, I'd rather have another call for placement decisions, that would be called on an fd to do placement

[PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-18 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-03-18 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: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-03-19 Thread David Chinner
On Mon, Mar 19, 2007 at 05:37:03PM +1100, Nick Piggin wrote: David Chinner wrote: +/* + * block_page_mkwrite() is not allowed to change the file size as it gets + * called from a page fault handler when a page is first dirtied. Hence we must + * be careful to check for EOF conditions

Re: [ANNOUNCE] new new aops patchset

2007-04-04 Thread David Chinner
On Mon, Apr 02, 2007 at 02:09:34PM +0200, Nick Piggin wrote: Updated aops patchset against 2.6.21-rc5. http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/ Files/dirs are 2.6.21-rc5-new-aops* Contains numerous fixes from Mark and myself -- I'd say the core code is

Re: [ANNOUNCE] new new aops patchset

2007-04-04 Thread David Chinner
On Thu, Apr 05, 2007 at 10:10:18AM +1000, David Chinner wrote: On Mon, Apr 02, 2007 at 02:09:34PM +0200, Nick Piggin wrote: Updated aops patchset against 2.6.21-rc5. http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/ Files/dirs are 2.6.21-rc5-new-aops

Re: [ANNOUNCE] new new aops patchset

2007-04-05 Thread David Chinner
On Thu, Apr 05, 2007 at 05:00:44AM +0200, Nick Piggin wrote: On Thu, Apr 05, 2007 at 12:43:50PM +1000, David Chinner wrote: On Thu, Apr 05, 2007 at 10:10:18AM +1000, David Chinner wrote: On Mon, Apr 02, 2007 at 02:09:34PM +0200, Nick Piggin wrote: Updated aops patchset against 2.6.21-rc5

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-16 Thread David Chinner
On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: I'm interested in getting input for implementing an ioctl to efficiently map file extents holes (FIEMAP) instead of looping over FIBMAP a billion times. We already have customers with single files in the 10TB range and we

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-18 Thread David Chinner
On Wed, Apr 18, 2007 at 06:21:39PM -0600, Andreas Dilger wrote: On Apr 16, 2007 21:22 +1000, David Chinner wrote: On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: struct fiemap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len

Re: [RFC][PATCH] ChunkFS: fs fission for faster fsck

2007-04-25 Thread David Chinner
On Tue, Apr 24, 2007 at 04:53:11PM -0500, Amit Gud wrote: Nikita Danilov wrote: Maybe I failed to describe the problem presicely. Suppose that all chunks have been checked. After that, for every inode I0 having continuations I1, I2, ... In, one has to check that every logical block is

Re: [RFC][PATCH] ChunkFS: fs fission for faster fsck

2007-04-25 Thread David Chinner
On Wed, Apr 25, 2007 at 04:03:44PM -0700, Valerie Henson wrote: On Wed, Apr 25, 2007 at 08:54:34PM +1000, David Chinner wrote: On Tue, Apr 24, 2007 at 04:53:11PM -0500, Amit Gud wrote: The structure looks like this: -- -- | cnode 0

Re: [PATCH 0/5] fallocate system call

2007-04-29 Thread David Chinner
On Thu, Apr 26, 2007 at 11:20:56PM +0530, Amit K. Arora wrote: Based on the discussion, this new patchset uses following as the interface for fallocate() system call: asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len) Ok, so now for the hard questions - what are the

[PATCH] ia64 fallocate syscall

2007-04-29 Thread David Chinner
ia64 fallocate syscall support. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- arch/ia64/kernel/entry.S |1 + include/asm-ia64/unistd.h |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) Index: 2.6.x-xfs-new/arch/ia64/kernel/entry.S

[PATCH] XFS -fallocate() support

2007-04-29 Thread David Chinner
Add XFS support for -fallocate() vector. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- fs/xfs/linux-2.6/xfs_iops.c | 48 1 file changed, 48 insertions(+) Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_iops.c

[PATCH] Add preallocation beyond EOF to fallocate

2007-04-29 Thread David Chinner
Add new mode to -fallocate() to allow allocation to occur beyond the current EOF without changing the file size. Implement in XFS -fallocate() vector. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- fs/xfs/linux-2.6/xfs_iops.c |8 +--- include/linux/fs.h |1 + 2 files

Re: [PATCH 0/5] fallocate system call

2007-04-29 Thread David Chinner
On Sun, Apr 29, 2007 at 10:25:59PM -0700, Chris Wedgwood wrote: On Mon, Apr 30, 2007 at 10:47:02AM +1000, David Chinner wrote: For FA_ALLOCATE, it's supposed to change the file size if we allocate past EOF, right? I would argue no. Use truncate for that. I'm going from the ext4

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-30 Thread David Chinner
On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: On Apr 19, 2007 11:54 +1000, David Chinner wrote: struct fiemap { __u64 fm_start; /* logical start offset of mapping (in/out) */ __u64 fm_len; /* logical length of mapping (in/out) */ __u32

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-01 Thread David Chinner
On Mon, Apr 30, 2007 at 09:39:06PM -0700, Nicholas Miell wrote: On Tue, 2007-05-01 at 14:22 +1000, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: This is actually for future use. Any flags that are added into this range must be understood by both

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-01 Thread David Chinner
On Tue, May 01, 2007 at 07:37:20PM +0100, Anton Altaparmakov wrote: On 1 May 2007, at 05:22, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: The FIBMAP ioctl is for privileged users only, and I wonder if FIEMAP should be the same, or at least

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-01 Thread David Chinner
On Tue, May 01, 2007 at 03:30:40PM -0700, Andreas Dilger wrote: On May 01, 2007 14:22 +1000, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: Hmm, I'd thought offline would migrate to EXTENT_UNKNOWN, but I didn't I disagree - why would you want

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-02 Thread David Chinner
On Tue, May 01, 2007 at 07:46:53PM +0100, Anton Altaparmakov wrote: On 1 May 2007, at 15:20, David Chinner wrote: So, either the filesystem will understand the flag or iff the unknown flag is in the incompat set, it will return EINVAL or else the unknown flag will be safely ignored

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-02 Thread David Chinner
On Wed, May 02, 2007 at 09:23:38AM +0100, Anton Altaparmakov wrote: On a different issue, do you think it would be worth adding an option flags like FIEMAP_DONT_RELOCATE or something similar that would be a compulsory flag and if set the FS is not allowed to move the file around/change

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-02 Thread David Chinner
On Wed, May 02, 2007 at 10:36:12AM +0100, Anton Altaparmakov wrote: On 2 May 2007, at 10:15, David Chinner wrote: On Tue, May 01, 2007 at 07:46:53PM +0100, Anton Altaparmakov wrote: And all applications will run against a multitude of kernels. So version X of the application will run

Re: TAKE 963965 - Add lockdep support for XFS

2007-05-03 Thread David Chinner
On Wed, May 02, 2007 at 12:51:05PM +0100, Christoph Hellwig wrote: On Fri, Apr 27, 2007 at 06:50:45PM +1000, Lachlan McIlroy wrote: Add lockdep support for XFS I don't think this is entirely correct, and it misses some of the most interesting cases. Yeah, we decided it was better to get

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-05-04 Thread David Chinner
On Thu, May 03, 2007 at 09:29:55PM -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:33:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: This patch implements the fallocate() system call and adds support for i386, x86_64 and powerpc. ... +{ + struct file *file; + struct inode

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-05-04 Thread David Chinner
On Thu, May 03, 2007 at 11:28:15PM -0700, Andrew Morton wrote: On Fri, 4 May 2007 16:07:31 +1000 David Chinner [EMAIL PROTECTED] wrote: On Thu, May 03, 2007 at 09:29:55PM -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:33:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-05-09 Thread David Chinner
? - David Chinner raised this question in following post: http://lkml.org/lkml/2007/4/29/407 I think it makes sense to update the [mc]time for a successfull preallocation/unallocation. Does anyone feel otherwise ? It will be interesting to know how XFS behaves currently

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-05-12 Thread David Chinner
On Fri, May 11, 2007 at 04:33:01PM +0530, Suparna Bhattacharya wrote: On Fri, May 11, 2007 at 08:39:50AM +1000, David Chinner wrote: All I'm really interested in right now is that the fallocate _interface_ can be used as a *complete replacement* for the pre-existing XFS-specific ioctls

Re: [PATCH 1/5][TAKE3] fallocate() implementation on i86, x86_64 and powerpc

2007-05-15 Thread David Chinner
On Wed, May 16, 2007 at 01:33:59AM +0530, Amit K. Arora wrote: This patch implements sys_fallocate() and adds support on i386, x86_64 and powerpc platforms. Can you please pick up the ia64 support patch I posted as well? Changelog: - Note: The changes below are from the initial post

Re: [PATCH 1 of 2] block_page_mkwrite() Implementation V2

2007-05-16 Thread David Chinner
On Wed, May 16, 2007 at 11:19:29AM +0100, David Howells wrote: However, page_mkwrite() isn't told which bit of the page is going to be written to. This means it has to ask prepare_write() to make sure the whole page is filled in. In other words, offset and to must be equal (in AFS I set

Re: [PATCH 1/5][TAKE3] fallocate() implementation on i86, x86_64 and powerpc

2007-05-16 Thread David Chinner
On Wed, May 16, 2007 at 07:21:16AM -0500, Dave Kleikamp wrote: On Wed, 2007-05-16 at 13:16 +1000, David Chinner wrote: On Wed, May 16, 2007 at 01:33:59AM +0530, Amit K. Arora wrote: Following changes were made to the previous version: 1) Added description before sys_fallocate

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

2007-05-25 Thread David Chinner
On Fri, May 25, 2007 at 05:58:25PM +1000, Neil Brown wrote: We can think of there being three types of devices: 1/ SAFE. With a SAFE device, there is no write-behind cache, or if there is it is non-volatile. Once a write completes it is completely safe. Such a device

Re: XFS: curcular locking re iprune_mutex vs ip-i_iolock-mr_lock

2007-05-27 Thread David Chinner
On Sat, May 26, 2007 at 02:29:48AM +0400, Alexey Dobriyan wrote: === [ INFO: possible circular locking dependency detected ] 2.6.22-rc2 #1 --- mplayer/16241 is trying to acquire lock:

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

2007-05-27 Thread David Chinner
On Mon, May 28, 2007 at 11:30:32AM +1000, Neil Brown wrote: Thanks everyone for your input. There was some very valuable observations in the various emails. I will try to pull most of it together and bring out what seem to be the important points. 1/ A BIO_RW_BARRIER request should

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

2007-05-27 Thread David Chinner
On Mon, May 28, 2007 at 12:57:53PM +1000, Neil Brown wrote: On Monday May 28, [EMAIL PROTECTED] wrote: On Mon, May 28, 2007 at 11:30:32AM +1000, Neil Brown wrote: Thanks everyone for your input. There was some very valuable observations in the various emails. I will try to pull most

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

2007-05-29 Thread David Chinner
On Tue, May 29, 2007 at 04:03:43PM -0400, Phillip Susi wrote: David Chinner wrote: The use of barriers in XFS assumes the commit write to be on stable storage before it returns. One of the ordering guarantees that we need is that the transaction (commit write) is on disk before the metadata

Re: [patch 0/2] i_version update

2007-05-29 Thread David Chinner
On Fri, May 25, 2007 at 06:25:31PM +0200, Jean noel Cordenner wrote: Hi, This is an update of the i_version patch. The i_version field is a 64bit counter that is set on every inode creation and that is incremented every time the inode data is modified (similarly to the ctime time-stamp).

Re: [PATCH] add procfs tunable to enable immediate panic when there are busy inodes after umount

2007-05-29 Thread David Chinner
On Tue, May 29, 2007 at 11:40:42AM -0400, Jeff Layton wrote: After spending quite a bit of time tracking down a VFS: busy inodes after unmount problem, it occurs to me that it would be nice to be able to force a panic when that occurs. While an oops message alone is not generally helpful for

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

2007-05-30 Thread David Chinner
On Tue, May 29, 2007 at 05:01:24PM -0700, [EMAIL PROTECTED] wrote: On Wed, 30 May 2007, David Chinner wrote: On Tue, May 29, 2007 at 04:03:43PM -0400, Phillip Susi wrote: David Chinner wrote: The use of barriers in XFS assumes the commit write to be on stable storage before it returns. One

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

2007-05-30 Thread David Chinner
On Wed, May 30, 2007 at 09:52:49AM -0700, [EMAIL PROTECTED] wrote: On Wed, 30 May 2007, David Chinner wrote: with the barrier is on stable storage when I/o completion is signalled. The existing barrier implementation (where it works) provide these requirements. We need barriers to retain

Re: [patch 0/2] i_version update

2007-05-30 Thread David Chinner
On Wed, May 30, 2007 at 04:32:57PM -0700, Mingming Cao wrote: On Wed, 2007-05-30 at 10:21 +1000, David Chinner wrote: On Fri, May 25, 2007 at 06:25:31PM +0200, Jean noel Cordenner wrote: Hi, This is an update of the i_version patch. The i_version field is a 64bit counter

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

2007-05-30 Thread David Chinner
On Thu, May 31, 2007 at 02:07:39AM +0100, Alasdair G Kergon wrote: On Thu, May 31, 2007 at 10:46:04AM +1000, Neil Brown wrote: If a filesystem cares, it could 'ask' as suggested above. What would be a good interface for asking? XFS already tests: bd_disk-queue-ordered ==

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

2007-05-31 Thread David Chinner
On Thu, May 31, 2007 at 08:26:45AM +0200, Jens Axboe wrote: On Thu, May 31 2007, David Chinner wrote: IOWs, there are two parts to the problem: 1 - guaranteeing I/O ordering 2 - guaranteeing blocks are on persistent storage. Right now, a single barrier I/O is used to provide

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

2007-05-31 Thread David Chinner
On Thu, May 31, 2007 at 02:31:21PM -0400, Phillip Susi wrote: David Chinner wrote: That sounds like a good idea - we can leave the existing WRITE_BARRIER behaviour unchanged and introduce a new WRITE_ORDERED behaviour that only guarantees ordering. The filesystem can then choose which to use

Re: [RFC] obsoleting /etc/mtab

2007-05-31 Thread David Chinner
On Thu, May 31, 2007 at 09:40:49AM -0700, H. Peter Anvin wrote: Miklos Szeredi wrote: (2) needs work in the filesystems implicated. I already have patches for ext2, ext3, tmpfs, devpts and hostfs, and it would be nice if the maintainers for others could help out. A lot of these

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

2007-06-01 Thread David Chinner
On Fri, Jun 01, 2007 at 03:59:51PM +1000, Neil Brown wrote: On Friday June 1, [EMAIL PROTECTED] wrote: On Thu, May 31, 2007 at 02:31:21PM -0400, Phillip Susi wrote: David Chinner wrote: That sounds like a good idea - we can leave the existing WRITE_BARRIER behaviour unchanged

Re: xfs_fsr allocation group optimization

2007-06-11 Thread David Chinner
On Tue, Jun 12, 2007 at 09:07:36AM +1000, Nathan Scott wrote: On Mon, 2007-06-11 at 08:58 -0700, Chris Wedgwood wrote: In the way xfs_fsr operates now, in almost all user space, I don't see any good way to tell XFS where to place the extents, other than creating the temporary file in the

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-06-12 Thread David Chinner
On Tue, Jun 12, 2007 at 11:46:52AM +0530, Amit K. Arora wrote: On Sat, May 12, 2007 at 06:01:57PM +1000, David Chinner wrote: Minimal definition to replace what applicaitons use on XFS and to support poasix_fallocate are the thre that have been mentioned so far (FA_ALLOCATE, FA_PREALLOCATE

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-06-13 Thread David Chinner
On Tue, Jun 12, 2007 at 11:46:52AM +0530, Amit K. Arora wrote: Did you get time to write the above man page ? It will help to push further patches in time (eg. for FA_PREALLOCATE mode). First pass is attached. `nroff -man fallocate.2 | less` to view. Cheers, Dave. -- Dave Chinner Principal

Re: [PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-06-14 Thread David Chinner
On Thu, Jun 14, 2007 at 03:14:58AM -0600, Andreas Dilger wrote: On Jun 14, 2007 09:52 +1000, David Chinner wrote: B FA_PREALLOCATE provides the same functionality as B FA_ALLOCATE except it does not ever change the file size. This allows allocation of zero blocks beyond the end of file

Re: [RFC] fsblock

2007-06-26 Thread David Chinner
On Tue, Jun 26, 2007 at 01:55:11PM +1000, Nick Piggin wrote: David Chinner wrote: On Sun, Jun 24, 2007 at 03:45:28AM +0200, Nick Piggin wrote: I'm announcing fsblock now because it is quite intrusive and so I'd like to get some thoughts about significantly changing this core part

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

2007-06-26 Thread David Chinner
On Mon, Jun 25, 2007 at 03:46:26PM -0600, Andreas Dilger wrote: On Jun 25, 2007 20:33 +0530, Amit K. Arora wrote: I have not implemented FA_FL_FREE_ENOSPC and FA_ZERO_SPACE flags yet, as *suggested* by Andreas in http://lkml.org/lkml/2007/6/14/323 post. If it is decided that these flags

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

2007-06-26 Thread David Chinner
On Tue, Jun 26, 2007 at 11:34:13AM -0400, Andreas Dilger wrote: On Jun 26, 2007 16:02 +0530, Amit K. Arora wrote: On Mon, Jun 25, 2007 at 03:46:26PM -0600, Andreas Dilger wrote: Can you clarify - what is the current behaviour when ENOSPC (or some other error) is hit? Does it keep the

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

2007-06-26 Thread David Chinner
On Mon, Jun 25, 2007 at 03:52:39PM -0600, Andreas Dilger wrote: On Jun 25, 2007 19:15 +0530, Amit K. Arora wrote: +#define FA_FL_DEALLOC 0x01 /* default is allocate */ +#define FA_FL_KEEP_SIZE0x02 /* default is extend/shrink size */ +#define FA_FL_DEL_DATA 0x04 /* default is

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

2007-06-26 Thread David Chinner
On Tue, Jun 26, 2007 at 11:42:50AM -0400, Andreas Dilger wrote: On Jun 26, 2007 16:15 +0530, Amit K. Arora wrote: On Mon, Jun 25, 2007 at 03:52:39PM -0600, Andreas Dilger wrote: In XFS one of the (many) ALLOC modes is to zero existing data on allocate. For ext4 all this would mean is

Re: [PATCH 7/7][TAKE5] ext4: support new modes

2007-06-26 Thread David Chinner
, update only ctime. Otherwise, update ctime and mtime both. I'm only being the advocate for requirements David Chinner has put forward due to existing behaviour in XFS. This is one of the reasons why I think the flags mechanism we now have - we can encode the various different behaviours

Re: [RFC] fsblock

2007-06-27 Thread David Chinner
On Wed, Jun 27, 2007 at 07:32:45AM +0200, Nick Piggin wrote: I think using fsblock to drive the IO and keep the pagecache flags uptodate and using a btree in the filesystem to manage extents of block allocations wouldn't be a bad idea though. Do any filesystems actually do this? Yes. XFS. But

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

2007-06-27 Thread David Chinner
On Tue, Jun 26, 2007 at 11:49:15PM -0400, Andreas Dilger wrote: On Jun 27, 2007 09:14 +1000, David Chinner wrote: Someone on the XFs list had an interesting request - preallocated swap files. You can't use unwritten extents for this because of sys_swapon()s use of bmap() (XFS returns holes

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

2007-06-27 Thread David Chinner
On Thu, Jun 28, 2007 at 09:28:36AM +1000, Nathan Scott wrote: On Wed, 2007-06-27 at 23:36 +1000, David Chinner wrote: Allows setup_swap_extents() to use preallocated files on XFS filesystems for swap files without ever needing to convert them. Using unwritten extents (as opposed

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

2007-06-28 Thread David Chinner
On Thu, Jun 28, 2007 at 11:49:13PM +0530, Amit K. Arora wrote: On Wed, Jun 27, 2007 at 09:18:04AM +1000, David Chinner wrote: On Tue, Jun 26, 2007 at 11:34:13AM -0400, Andreas Dilger wrote: On Jun 26, 2007 16:02 +0530, Amit K. Arora wrote: On Mon, Jun 25, 2007 at 03:46:26PM -0600

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

2007-07-01 Thread David Chinner
On Sat, Jun 30, 2007 at 11:21:11AM +0100, Christoph Hellwig wrote: On Tue, Jun 26, 2007 at 04:02:47PM +0530, Amit K. Arora wrote: Can you clarify - what is the current behaviour when ENOSPC (or some other error) is hit? Does it keep the current fallocate() or does it free it?

Re: vm/fs meetup details

2007-07-05 Thread David Chinner
On Thu, Jul 05, 2007 at 01:40:08PM -0700, Zach Brown wrote: - repair driven design, we know what it is (Val told us), but how does it apply to the things we are currently working on? should we do more of it? I'm sure Chris and I could talk about the design elements in btrfs that

Re: vm/fs meetup details

2007-07-06 Thread David Chinner
On Fri, Jul 06, 2007 at 04:26:51AM +0200, Nick Piggin wrote: On Thu, Jul 05, 2007 at 05:40:57PM -0400, Rik van Riel wrote: David Chinner wrote: On Thu, Jul 05, 2007 at 01:40:08PM -0700, Zach Brown wrote: - repair driven design, we know what it is (Val told us), but how does it apply

Re: vm/fs meetup details

2007-07-06 Thread David Chinner
On Fri, Jul 06, 2007 at 12:26:23PM +0200, Jörn Engel wrote: On Fri, 6 July 2007 20:01:10 +1000, David Chinner wrote: On Fri, Jul 06, 2007 at 04:26:51AM +0200, Nick Piggin wrote: Keep in mind that the way to get the most out of this meeting is for the fs people to have topics

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

[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 === ---

[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

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

2007-07-12 Thread David Chinner
On Thu, Jul 12, 2007 at 12:58:13PM +0530, Suparna Bhattacharya wrote: Why don't we just merge the interface for preallocation (essentially enough to satisfy posix_fallocate() and the simple XFS requirement for space reservation without changing file size), which there is clear agreement on

Re: [PATCH 1/6][TAKE7] manpage for fallocate

2007-07-13 Thread David Chinner
On Fri, Jul 13, 2007 at 06:16:01PM +0530, Amit K. Arora wrote: Following is the modified version of the manpage originally submitted by David Chinner. Please use `nroff -man fallocate.2 | less` to view. This includes changes suggested by Heikki Orsila and Barry Naujok. Can we get itemised

[PATCH] ia64 fallocate system call

2007-07-15 Thread David Chinner
sys_fallocate for ia64. This uses the empty slot originally reserved for move_pages. Signed-Off-By: Dave Chinner [EMAIL PROTECTED] --- arch/ia64/kernel/entry.S |2 +- include/asm-ia64/unistd.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index:

  1   2   >