Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread David Howells
Andrew Morton [EMAIL PROTECTED] wrote: + BUG_ON(i_size 0x); // TODO: use 64-bit store You're sure this isn't user-triggerable? Hmmm... I'm not. I'll whip up a patch for this. kmap_atomic() could be used here and is better. Yeah. It used to have something that slept in the

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread Andrew Morton
On Wed, 09 May 2007 11:25:47 +0100 David Howells [EMAIL PROTECTED] wrote: + set_page_dirty(page); + + if (PageDirty(page)) + _debug(dirtied); + + return 0; +} One would normally run mark_inode_dirty() after any i_size_write()? Not in this case, I assume,

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread Andrew Morton
On Wed, 09 May 2007 12:07:39 +0100 David Howells [EMAIL PROTECTED] wrote: Andrew Morton [EMAIL PROTECTED] wrote: set_page_dirty() will set I_DIRTY_PAGES only. ie: the inode has dirty pagecache data. To tell the VFS that the inode itself is dirty one needs to run mark_inode_dirty().

Re: [PATCH 3/3] AFS: Implement basic file write support

2007-05-09 Thread Nick Piggin
David Howells wrote: +/* + * prepare a page for being written to + */ +static int afs_prepare_page(struct afs_vnode *vnode, struct page *page, + struct key *key, unsigned offset, unsigned to) +{ + unsigned eof, tail, start, stop, len; + loff_t i_size, pos;