Re: [PATCH 02/11] vfs: Add better VFS support for page_mkwrite when blocksize < pagesize

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nick Piggin <npiggin@...>
Cc: Christoph Hellwig <hch@...>, Jan Kara <jack@...>, LKML <linux-kernel@...>, <linux-mm@...>, <linux-fsdevel@...>
Date: Saturday, July 4, 2009 - 11:18 am

On Thu, Jul 02, 2009 at 09:22:25AM +0200, Nick Piggin wrote:

Good, that's a much better calling and naming convention.


In the end ATTR_SIZE should not be passed to ->setattr anymore, and
->setsize should become mandatory.  For the transition I would recommend
calling ->setsize if present else fall back to the current way.  That
way we can migreate one filesystem per patch to the new scheme.

I would suggest giving the flags to ->setsize their own namespace with
two flags so far SETSIZE_FTRUNCATE (need to update the file size and
have a file struct available) and SETSIZE_OPEN for the ATTR_OPEN case.

That beeing said I reallye hate the conditiona file argument for
ftrunctate (currently hidden inside struct iattr), maybe we're better
off having am optional int (*ftruncate)(struct file *) method for those
filesystems that need it, with a fallback to ->setsize.

And yeah, maybe ->setsize might better be left as ->truncate, but if
we want a nicely bisectable migration we'd have to rename the old
truncate to e.g. ->old_truncate before.  That's probably worth having
the better naming in the end.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/10] Fix page_mkwrite() for blocksize &lt; pages..., Christoph Hellwig, (Tue Jun 16, 10:34 am)
Re: [PATCH 0/10] Fix page_mkwrite() for blocksize &lt; pages..., Christoph Hellwig, (Tue Jun 30, 1:44 pm)
Re: [PATCH 02/11] vfs: Add better VFS support for page_mkwri..., Christoph Hellwig, (Thu Jun 25, 1:47 pm)
Re: [PATCH 02/11] vfs: Add better VFS support for page_mkwri..., Christoph Hellwig, (Tue Jun 30, 1:37 pm)
Re: [PATCH 02/11] vfs: Add better VFS support for page_mkwri..., Christoph Hellwig, (Sat Jul 4, 11:18 am)
[PATCH 09/11] vfs: Export wakeup_pdflush, Jan Kara, (Mon Jun 15, 1:59 pm)