* ext4-mm-delalloc-ext4.patch @ 2008-02-29 9:05 Andrew Morton 2008-02-29 17:26 ` ext4-mm-delalloc-ext4.patch Mingming Cao 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2008-02-29 9:05 UTC (permalink / raw) To: linux-ext4 generic_commit_write() is scheduled for removal in 2.6.26 and is removed already from -mm. Please switch to the new write_begin/write_end interface. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext4-mm-delalloc-ext4.patch 2008-02-29 9:05 ext4-mm-delalloc-ext4.patch Andrew Morton @ 2008-02-29 17:26 ` Mingming Cao 2008-03-03 21:08 ` ext4-mm-delalloc-ext4.patch Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: Mingming Cao @ 2008-02-29 17:26 UTC (permalink / raw) To: Andrew Morton, tytso; +Cc: linux-ext4 On Fri, 2008-02-29 at 01:05 -0800, Andrew Morton wrote: > generic_commit_write() is scheduled for removal in 2.6.26 and is > removed already from -mm. > > Please switch to the new write_begin/write_end interface. I have a patch for that, sent to linux-ext4 last week. I will merge it to the parent patch and update in ext4 patch queue. ext4: use write_begin/write_end in delalloc instead of prepare_write() From: Mingming Cao <cmm@us.ibm.com> Since generally the current mainline VFS API changed to use write-begin() and write_end(), updating ext4 delayed allocation to adopt this change. Signed-off-by: Mingming Cao <cmm@us.ibm.com> --- fs/ext4/inode.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) Index: linux-2.6.25-rc2/fs/ext4/inode.c =================================================================== --- linux-2.6.25-rc2.orig/fs/ext4/inode.c 2008-02-21 17:30:59.000000000 -0800 +++ linux-2.6.25-rc2/fs/ext4/inode.c 2008-02-22 12:17:16.000000000 -0800 @@ -1421,13 +1421,6 @@ static int ext4_da_get_block_prep(struct return ret; } - -static int ext4_da_prepare_write(struct file *file, struct page *page, - unsigned from, unsigned to) -{ - return block_prepare_write(page, from, to, ext4_da_get_block_prep); -} - static int ext4_da_get_block_write(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) { @@ -1485,11 +1478,34 @@ out: } static int ext4_da_writepages(struct address_space *mapping, - struct writeback_control *wbc) + struct writeback_control *wbc) { return mpage_da_writepages(mapping, wbc, ext4_da_get_block_write); } +static int ext4_da_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata) +{ + int ret; + struct page *page; + pgoff_t index; + unsigned from, to; + + index = pos >> PAGE_CACHE_SHIFT; + from = pos & (PAGE_CACHE_SIZE - 1); + to = from + len; + + page = __grab_cache_page(mapping, index); + if (!page) + return -ENOMEM; + *pagep = page; + + ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, + ext4_da_get_block_prep); + return ret; +} + static void ext4_da_invalidatepage(struct page *page, unsigned long offset) { struct buffer_head *head, *bh; @@ -1990,8 +2006,8 @@ static const struct address_space_operat .writepage = ext4_writeback_writepage, .writepages = ext4_da_writepages, .sync_page = block_sync_page, - .prepare_write = ext4_da_prepare_write, - .commit_write = generic_commit_write, + .write_begin = ext4_da_write_begin, + .write_end = generic_write_end, .bmap = ext4_bmap, .invalidatepage = ext4_da_invalidatepage, .releasepage = ext4_releasepage, ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext4-mm-delalloc-ext4.patch 2008-02-29 17:26 ` ext4-mm-delalloc-ext4.patch Mingming Cao @ 2008-03-03 21:08 ` Andrew Morton 2008-03-03 23:12 ` ext4-mm-delalloc-ext4.patch Mingming Cao 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2008-03-03 21:08 UTC (permalink / raw) To: cmm; +Cc: tytso, linux-ext4 On Fri, 29 Feb 2008 09:26:36 -0800 Mingming Cao <cmm@us.ibm.com> wrote: > On Fri, 2008-02-29 at 01:05 -0800, Andrew Morton wrote: > > generic_commit_write() is scheduled for removal in 2.6.26 and is > > removed already from -mm. > > > > Please switch to the new write_begin/write_end interface. > > I have a patch for that, sent to linux-ext4 last week. I will merge it > to the parent patch and update in ext4 patch queue. > > ext4: use write_begin/write_end in delalloc instead of prepare_write() > From: Mingming Cao <cmm@us.ibm.com> Thanks. But this change still isn't at ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/LATEST/broken-out/, so ext4 is still a no-build for me. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext4-mm-delalloc-ext4.patch 2008-03-03 21:08 ` ext4-mm-delalloc-ext4.patch Andrew Morton @ 2008-03-03 23:12 ` Mingming Cao 0 siblings, 0 replies; 4+ messages in thread From: Mingming Cao @ 2008-03-03 23:12 UTC (permalink / raw) To: Andrew Morton; +Cc: tytso, linux-ext4 On Mon, 2008-03-03 at 13:08 -0800, Andrew Morton wrote: > On Fri, 29 Feb 2008 09:26:36 -0800 > Mingming Cao <cmm@us.ibm.com> wrote: > > > On Fri, 2008-02-29 at 01:05 -0800, Andrew Morton wrote: > > > generic_commit_write() is scheduled for removal in 2.6.26 and is > > > removed already from -mm. > > > > > > Please switch to the new write_begin/write_end interface. > > > > I have a patch for that, sent to linux-ext4 last week. I will merge it > > to the parent patch and update in ext4 patch queue. > > > > ext4: use write_begin/write_end in delalloc instead of prepare_write() > > From: Mingming Cao <cmm@us.ibm.com> > > Thanks. But this change still isn't at > ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/LATEST/broken-out/, > so ext4 is still a no-build for me. > Oh, sorry about the confusion. What I mean by "ext4 patch queue" is a cutting edge ext4 development tree, which is not intend for mm or upstream inclusion. I have asked Ted this morning to update the "official" ext4 patch queue at kernel.org, which is visiable to you and the world. I can't update it myself. Best regards, Mingming ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-03 23:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-29 9:05 ext4-mm-delalloc-ext4.patch Andrew Morton 2008-02-29 17:26 ` ext4-mm-delalloc-ext4.patch Mingming Cao 2008-03-03 21:08 ` ext4-mm-delalloc-ext4.patch Andrew Morton 2008-03-03 23:12 ` ext4-mm-delalloc-ext4.patch Mingming Cao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox