* Patches for the patchqueue @ 2008-06-05 9:50 Aneesh Kumar K.V 2008-06-05 9:51 ` Aneesh Kumar K.V 0 siblings, 1 reply; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-05 9:50 UTC (permalink / raw) To: Mingming Cao, Theodore Tso; +Cc: ext4 development Hi Mingming, These are the patches for patch queue. They have been sent to the mailing list before. I am attaching them below so that it can be easily pushed to the patch queue. The patches will be sent as a follow up to this mail. I modified the delalloc-clear-bh-delay-bit-fix.patch to address only the VFS bug. The delay bit is properly cleared in 0001-delalloc-enospc.patch. I guess we should also push 003-delalloc-clear-bh-delay-bit-fix.patch to the stable series as it is a VFS bug in handling delay buffer. 002-blkcleanup.patch patch can be merged with ext4-use-inode-preallocation-with-noextents.patch. I am just posting it as a separate patch so that others can review the changes. The series file looks like + ext4-use-inode-preallocation-with-noextents.patch + 002-blkcleanup.patch + ext4-call-blkdev_issue_flush-on-fsync.patch + ext4-mb-add-ext4_has_free_blocks-check.patch ...... + jbd2-Remove-data-ordered-mode-support-using-jbd-buf.patch + delalloc-vfs.patch + 003-delalloc-clear-bh-delay-bit-fix.patch + ext4-fix-fs-corruption-with-delalloc.patch ..... + percpucounter-add-sum-and-set-function.patch + 0001-delalloc-enospc.patch + jbd-blocks-reservation-fix-for-large-blk.patch + jbd2-blocks-reservation-fix-for-large-blk.patch -aneesh ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 9:50 Patches for the patchqueue Aneesh Kumar K.V @ 2008-06-05 9:51 ` Aneesh Kumar K.V 2008-06-05 9:53 ` Aneesh Kumar K.V 0 siblings, 1 reply; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-05 9:51 UTC (permalink / raw) To: Mingming Cao, Theodore Tso; +Cc: ext4 development [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 002-blkcleanup.patch --] [-- Type: text/x-diff, Size: 5041 bytes --] ext4: cleanup blockallocator From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- fs/ext4/balloc.c | 72 +++++++++++++++++++---------------------------------- fs/ext4/ext4.h | 2 + fs/ext4/mballoc.c | 2 + 3 files changed, 28 insertions(+), 48 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index b961ad1..c6e6a6f 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1645,7 +1645,7 @@ int ext4_should_retry_alloc(struct super_block *sb, int *retries) } /** - * ext4_new_blocks_old() -- core block(s) allocation function + * ext4_orlov_new_blocks() -- core block(s) allocation function * @handle: handle to this transaction * @inode: file inode * @goal: given target block(filesystem wide) @@ -1658,7 +1658,7 @@ int ext4_should_retry_alloc(struct super_block *sb, int *retries) * any specific goal block. * */ -ext4_fsblk_t ext4_new_blocks_old(handle_t *handle, struct inode *inode, +ext4_fsblk_t ext4_orlov_new_blocks(handle_t *handle, struct inode *inode, ext4_fsblk_t goal, unsigned long *count, int *errp) { struct buffer_head *bitmap_bh = NULL; @@ -1928,55 +1928,15 @@ ext4_fsblk_t ext4_new_blocks_old(handle_t *handle, struct inode *inode, return 0; } -ext4_fsblk_t ext4_new_meta_block(handle_t *handle, struct inode *inode, - ext4_fsblk_t goal, int *errp) -{ - struct ext4_allocation_request ar; - ext4_fsblk_t ret; - - if (!test_opt(inode->i_sb, MBALLOC)) { - unsigned long count = 1; - ret = ext4_new_blocks_old(handle, inode, goal, &count, errp); - return ret; - } - - memset(&ar, 0, sizeof(ar)); - ar.inode = inode; - ar.goal = goal; - ar.len = 1; - ret = ext4_mb_new_blocks(handle, &ar, errp); - return ret; -} -ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, - ext4_fsblk_t goal, unsigned long *count, int *errp) -{ - struct ext4_allocation_request ar; - ext4_fsblk_t ret; - - if (!test_opt(inode->i_sb, MBALLOC)) { - ret = ext4_new_blocks_old(handle, inode, goal, count, errp); - return ret; - } - - memset(&ar, 0, sizeof(ar)); - ar.inode = inode; - ar.goal = goal; - ar.len = *count; - ret = ext4_mb_new_blocks(handle, &ar, errp); - *count = ar.len; - return ret; -} - -ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, +static ext4_fsblk_t do_blk_alloc(handle_t *handle, struct inode *inode, ext4_lblk_t iblock, ext4_fsblk_t goal, - unsigned long *count, int *errp) + unsigned long *count, int *errp, int meta) { struct ext4_allocation_request ar; ext4_fsblk_t ret; if (!test_opt(inode->i_sb, MBALLOC)) { - ret = ext4_new_blocks_old(handle, inode, goal, count, errp); - return ret; + return ext4_orlov_new_blocks(handle, inode, goal, count, errp); } memset(&ar, 0, sizeof(ar)); @@ -1990,7 +1950,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, ar.goal = goal; ar.len = *count; ar.logical = iblock; - if (S_ISREG(inode->i_mode)) + if (S_ISREG(inode->i_mode) && !meta) ar.flags = EXT4_MB_HINT_DATA; else /* disable in-core preallocation for non-regular files */ @@ -2001,6 +1961,26 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, } +ext4_fsblk_t ext4_new_meta_block(handle_t *handle, struct inode *inode, + ext4_fsblk_t goal, int *errp) +{ + unsigned long count = 1; + return do_blk_alloc(handle, inode, 0, goal, &count, errp, 1); +} + +ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, + ext4_fsblk_t goal, unsigned long *count, int *errp) +{ + return do_blk_alloc(handle, inode, 0, goal, count, errp, 1); +} + +ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, + ext4_lblk_t iblock, ext4_fsblk_t goal, + unsigned long *count, int *errp) +{ + return do_blk_alloc(handle, inode, iblock, goal, count, errp, 0); +} + /** * ext4_count_free_blocks() -- count filesystem free blocks * @sb: superblock diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b3e62b7..e70ab6e 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -977,7 +977,7 @@ extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode, extern ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, ext4_lblk_t iblock, ext4_fsblk_t goal, unsigned long *count, int *errp); -extern ext4_fsblk_t ext4_new_blocks_old(handle_t *handle, struct inode *inode, +extern ext4_fsblk_t ext4_orlov_new_blocks(handle_t *handle, struct inode *inode, ext4_fsblk_t goal, unsigned long *count, int *errp); extern void ext4_free_blocks (handle_t *handle, struct inode *inode, ext4_fsblk_t block, unsigned long count, int metadata); diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 21a9e04..0011374 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4035,7 +4035,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, sbi = EXT4_SB(sb); if (!test_opt(sb, MBALLOC)) { - block = ext4_new_blocks_old(handle, ar->inode, ar->goal, + block = ext4_orlov_new_blocks(handle, ar->inode, ar->goal, &(ar->len), errp); return block; } ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 9:51 ` Aneesh Kumar K.V @ 2008-06-05 9:53 ` Aneesh Kumar K.V 2008-06-05 9:55 ` Aneesh Kumar K.V 2008-06-05 18:51 ` Andreas Dilger 0 siblings, 2 replies; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-05 9:53 UTC (permalink / raw) To: Mingming Cao, Theodore Tso; +Cc: ext4 development [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 003-delalloc-clear-bh-delay-bit-fix.patch --] [-- Type: text/x-diff, Size: 863 bytes --] vfs: Don't flush delay buffer to disk From: Mingming Cao <cmm@us.ibm.com> In block_write_full_page() error case, we need to check the delayed flag before flush bh to disk when trying to recover from error. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- fs/buffer.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 2f86ca5..26dddac 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1775,7 +1775,8 @@ static int __block_write_full_page(struct inode *inode, struct page *page, bh = head; /* Recovery: lock and submit the mapped buffers */ do { - if (buffer_mapped(bh) && buffer_dirty(bh)) { + if (buffer_mapped(bh) && buffer_dirty(bh) + && !buffer_delay(bh)) { lock_buffer(bh); mark_buffer_async_write(bh); } else { ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 9:53 ` Aneesh Kumar K.V @ 2008-06-05 9:55 ` Aneesh Kumar K.V 2008-06-05 18:02 ` Mingming Cao 2008-06-05 18:51 ` Andreas Dilger 1 sibling, 1 reply; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-05 9:55 UTC (permalink / raw) To: Mingming Cao, Theodore Tso; +Cc: ext4 development [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 0001-delalloc-enospc.patch --] [-- Type: text/x-diff, Size: 6892 bytes --] ext4: delalloc block reservation fix From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> a) We need to decrement the meta data blocks that got allocated from percpu s_freeblocks_counter b) We need to protect the reservation block counter so that reserve and release space doesn't race each other. c) don't check for free space in ext4_mb_new_blocks with delalloc We already reserved the space. e) Don't release space for block allocation from fallocate space. We don't reserve space for them f) clear the delay bit in ext4_da_get_block_write instead of __block_write_full_page so that we clear the delay bit for every successfull block allocation. We may fail while marking inode dirty in ext4_da_get_block_write after allocating block. So it is better to clear the delay bit in ext4_da_get_block_write rather than __block_write_full_page Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> --- fs/ext4/balloc.c | 8 ++++++++ fs/ext4/ext4_i.h | 2 ++ fs/ext4/inode.c | 46 ++++++++++++++++++++++++++++++++-------------- fs/ext4/mballoc.c | 7 ++++++- fs/ext4/super.c | 2 ++ 5 files changed, 50 insertions(+), 15 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 9b9057c..4932d29 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1971,6 +1971,14 @@ static ext4_fsblk_t do_blk_alloc(handle_t *handle, struct inode *inode, ar.flags = 0; ret = ext4_mb_new_blocks(handle, &ar, errp); *count = ar.len; + /* + * Account for the allocated meta blocks + */ + if (!(*errp) && meta) { + spin_lock(&EXT4_I(inode)->i_block_reservation_lock); + EXT4_I(inode)->i_allocated_meta_blocks += ar.len; + spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); + } return ret; } diff --git a/fs/ext4/ext4_i.h b/fs/ext4/ext4_i.h index fea6a5d..ef7409f 100644 --- a/fs/ext4/ext4_i.h +++ b/fs/ext4/ext4_i.h @@ -167,7 +167,9 @@ struct ext4_inode_info { /* allocation reservation info for delalloc */ unsigned long i_reserved_data_blocks; unsigned long i_reserved_meta_blocks; + unsigned long i_allocated_meta_blocks; unsigned short i_delalloc_reserved_flag; + spinlock_t i_block_reservation_lock; }; #endif /* _EXT4_I */ diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 2d00d05..417ed2c 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1426,11 +1426,12 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); unsigned long md_needed, mdblocks, total = 0; - /* - * calculate the amount of metadata blocks to reserve - * in order to allocate nrblocks - * worse case is one extent per block - */ + /* + * recalculate the amount of metadata blocks to reserve + * in order to allocate nrblocks + * worse case is one extent per block + */ + spin_lock(&EXT4_I(inode)->i_block_reservation_lock); total = EXT4_I(inode)->i_reserved_data_blocks + nrblocks; mdblocks = ext4_ext_calc_metadata_amount(inode, total); BUG_ON(mdblocks < EXT4_I(inode)->i_reserved_meta_blocks); @@ -1438,42 +1439,51 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) md_needed = mdblocks - EXT4_I(inode)->i_reserved_meta_blocks; total = md_needed + nrblocks; - if (ext4_has_free_blocks(sbi, total) < total) + if (ext4_has_free_blocks(sbi, total) < total) { + spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); return -ENOSPC; + } /* reduce fs free blocks counter */ percpu_counter_sub(&sbi->s_freeblocks_counter, total); EXT4_I(inode)->i_reserved_data_blocks += nrblocks; - EXT4_I(inode)->i_reserved_meta_blocks += md_needed; + EXT4_I(inode)->i_reserved_meta_blocks = mdblocks; + spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); return 0; /* success */ } void ext4_da_release_space(struct inode *inode, int used, int to_free) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); - int total, mdb, release; + int total, mdb, mdb_free, release; - /* calculate the number of metablocks still need to be reserved */ + spin_lock(&EXT4_I(inode)->i_block_reservation_lock); + /* recalculate the number of metablocks still need to be reserved */ total = EXT4_I(inode)->i_reserved_data_blocks - used - to_free; mdb = ext4_ext_calc_metadata_amount(inode, total); /* figure out how many metablocks to release */ BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); - mdb = EXT4_I(inode)->i_reserved_meta_blocks - mdb; + mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; - release = to_free + mdb; + /* Account for allocated meta_blocks */ + mdb_free -= EXT4_I(inode)->i_allocated_meta_blocks; + + release = to_free + mdb_free; /* update fs free blocks counter for truncate case */ percpu_counter_add(&sbi->s_freeblocks_counter, release); /* update per-inode reservations */ BUG_ON(used + to_free > EXT4_I(inode)->i_reserved_data_blocks); - EXT4_I(inode)->i_reserved_data_blocks -= used + to_free; + EXT4_I(inode)->i_reserved_data_blocks -= (used + to_free); BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); - EXT4_I(inode)->i_reserved_meta_blocks -= mdb; + EXT4_I(inode)->i_reserved_meta_blocks = mdb; + EXT4_I(inode)->i_allocated_meta_blocks = 0; + spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); } static void ext4_da_page_release_reservation(struct page *page, @@ -1555,7 +1565,15 @@ static int ext4_da_get_block_write(struct inode *inode, sector_t iblock, bh_result->b_size = (ret << inode->i_blkbits); /* release reserved-but-unused meta blocks */ - ext4_da_release_space(inode, ret, 0); + if (buffer_delay(bh_result)) { + ext4_da_release_space(inode, ret, 0); + /* + * clear the delay bit now that we allocated + * blocks. If it is not a single block request + * we clear the delay bit in mpage_put_bnr_to_bhs + */ + clear_buffer_delay(bh_result); + } /* * Update on-disk size along with block allocation diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 334e585..ec44d52 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4049,7 +4049,12 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, &(ar->len), errp); return block; } - ar->len = ext4_has_free_blocks(sbi, ar->len); + if (!EXT4_I(ar->inode)->i_delalloc_reserved_flag) { + /* + * With delalloc we already reserved the blocks + */ + ar->len = ext4_has_free_blocks(sbi, ar->len); + } if (ar->len == 0) { *errp = -ENOSPC; diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a990475..a33a0cf 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -575,7 +575,9 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) spin_lock_init(&ei->i_prealloc_lock); ei->i_reserved_data_blocks = 0; ei->i_reserved_meta_blocks = 0; + ei->i_allocated_meta_blocks = 0; ei->i_delalloc_reserved_flag = 0; + spin_lock_init(&(ei->i_block_reservation_lock)); return &ei->vfs_inode; } ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 9:55 ` Aneesh Kumar K.V @ 2008-06-05 18:02 ` Mingming Cao 2008-06-05 18:59 ` Aneesh Kumar K.V 0 siblings, 1 reply; 8+ messages in thread From: Mingming Cao @ 2008-06-05 18:02 UTC (permalink / raw) To: Aneesh Kumar K.V; +Cc: Theodore Tso, ext4 development On Thu, 2008-06-05 at 15:25 +0530, Aneesh Kumar K.V wrote: > f) clear the delay bit in ext4_da_get_block_write instead of > __block_write_full_page > so that we clear the delay bit for every successfull block allocation. > We may fail > while marking inode dirty in ext4_da_get_block_write after allocating > block. So > it is better to clear the delay bit in ext4_da_get_block_write rather > than > __block_write_full_page > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> > --- > @@ -1555,7 +1565,15 @@ static int ext4_da_get_block_write(struct inode > *inode, sector_t iblock, > bh_result->b_size = (ret << inode->i_blkbits); > > /* release reserved-but-unused meta blocks */ > - ext4_da_release_space(inode, ret, 0); > + if (buffer_delay(bh_result)) { > + ext4_da_release_space(inode, ret, 0); > + /* > + * clear the delay bit now that we allocated > + * blocks. If it is not a single block request > + * we clear the delay bit in > mpage_put_bnr_to_bhs > + */ > + clear_buffer_delay(bh_result); > + } > > /* > * Update on-disk size along with block allocation It seems with this fix, the buffer_delay bit is still cleared before the ext4_mark_inode_dirty() could return error? Actually the already allocated blocks are leaked if mark_inode-dirty() returns error, and we cleared the buffer_delay for the buffer needs block. Mingming ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 18:02 ` Mingming Cao @ 2008-06-05 18:59 ` Aneesh Kumar K.V 0 siblings, 0 replies; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-05 18:59 UTC (permalink / raw) To: Mingming Cao; +Cc: Theodore Tso, ext4 development On Thu, Jun 05, 2008 at 11:02:40AM -0700, Mingming Cao wrote: > On Thu, 2008-06-05 at 15:25 +0530, Aneesh Kumar K.V wrote: > > f) clear the delay bit in ext4_da_get_block_write instead of > > __block_write_full_page > > so that we clear the delay bit for every successfull block allocation. > > We may fail > > while marking inode dirty in ext4_da_get_block_write after allocating > > block. So > > it is better to clear the delay bit in ext4_da_get_block_write rather > > than > > __block_write_full_page > > > > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> > > --- > > > @@ -1555,7 +1565,15 @@ static int ext4_da_get_block_write(struct inode > > *inode, sector_t iblock, > > bh_result->b_size = (ret << inode->i_blkbits); > > > > /* release reserved-but-unused meta blocks */ > > - ext4_da_release_space(inode, ret, 0); > > + if (buffer_delay(bh_result)) { > > + ext4_da_release_space(inode, ret, 0); > > + /* > > + * clear the delay bit now that we allocated > > + * blocks. If it is not a single block request > > + * we clear the delay bit in > > mpage_put_bnr_to_bhs > > + */ > > + clear_buffer_delay(bh_result); > > + } > > > > /* > > * Update on-disk size along with block allocation > > It seems with this fix, the buffer_delay bit is still cleared before the > ext4_mark_inode_dirty() could return error? Actually the already > allocated blocks are leaked if mark_inode-dirty() returns error, and we > cleared the buffer_delay for the buffer needs block. > How abou the below ? For single block request we are ok to clear the delay bit as shown by the above patch. For multiple block request we clear the delay bit if the buffer_head passed to the get_block have its delay bit cleared. That should take care of the block leaking you mentioned above. diff --git a/fs/mpage.c b/fs/mpage.c index c4376ec..2c90350 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -908,25 +908,41 @@ static void mpage_da_map_blocks(struct mpage_da_data *mpd) new.b_blocknr = 0; new.b_size = remain; err = mpd->get_block(mpd->inode, next, &new, 1); - if (err) { + /* + * we may have successfully allocated block. But + * failed to mark inode dirty. If we have allocated + * blocks update the buffer_head mappings + */ + if (buffer_new(&new)) { /* - * Rather than implement own error handling - * here, we just leave remaining blocks - * unallocated and try again with ->writepage() + * buffer_head is only makred new if we have + * a successfull block allocation */ - break; - } - BUG_ON(new.b_size == 0); - - if (buffer_new(&new)) __unmap_underlying_blocks(mpd->inode, &new); + } /* * If blocks are delayed marked, we need to * put actual blocknr and drop delayed bit */ - if (buffer_delay(lbh)) + if (buffer_delay(lbh) && !buffer_delay(&new)) { + /* + * get_block if successfully allocated + * block will clear the delay bit of + * new buffer_head + */ mpage_put_bnr_to_bhs(mpd, next, &new); + } + + if (err) { + /* + * Rather than implement own error handling + * here, we just leave remaining blocks + * unallocated and try again with ->writepage() + */ + break; + } + BUG_ON(new.b_size == 0); /* go for the remaining blocks */ next += new.b_size >> mpd->inode->i_blkbits; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Patches for the patchqueue 2008-06-05 9:53 ` Aneesh Kumar K.V 2008-06-05 9:55 ` Aneesh Kumar K.V @ 2008-06-05 18:51 ` Andreas Dilger 1 sibling, 0 replies; 8+ messages in thread From: Andreas Dilger @ 2008-06-05 18:51 UTC (permalink / raw) To: Aneesh Kumar K.V; +Cc: Mingming Cao, Theodore Tso, ext4 development On Jun 05, 2008 15:23 +0530, Aneesh Kumar K.V wrote: > vfs: Don't flush delay buffer to disk > > In block_write_full_page() error case, we need to check the > delayed flag before flush bh to disk when trying to recover from > error. > @@ -1775,7 +1775,8 @@ static int __block_write_full_page(struct inode *inode, struct page *page, > bh = head; > /* Recovery: lock and submit the mapped buffers */ > do { > - if (buffer_mapped(bh) && buffer_dirty(bh)) { > + if (buffer_mapped(bh) && buffer_dirty(bh) > + && !buffer_delay(bh)) { Please use proper CodingStyle here. Firstly, this can fit on the previous line < 80 columns so it shouldn't be split. Secondly, if the line had to be split, the "&&" should go at the end of the previous line. Thirdly, the continued line should align with the 'if (' on the previous line. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Patches for the patchqueue @ 2008-06-06 18:24 Aneesh Kumar K.V 0 siblings, 0 replies; 8+ messages in thread From: Aneesh Kumar K.V @ 2008-06-06 18:24 UTC (permalink / raw) To: cmm, tytso, sandeen; +Cc: linux-ext4 I address most of the comments from the last review. The updated patches are sent as a follow up to this mail. Also the patches and the series file wich indicate their respective ordering in the patchqueue can be found at http://www.radian.org/~kvaneesh/ext4/jun-6-2008/ -aneesh ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-06 18:25 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-06-05 9:50 Patches for the patchqueue Aneesh Kumar K.V 2008-06-05 9:51 ` Aneesh Kumar K.V 2008-06-05 9:53 ` Aneesh Kumar K.V 2008-06-05 9:55 ` Aneesh Kumar K.V 2008-06-05 18:02 ` Mingming Cao 2008-06-05 18:59 ` Aneesh Kumar K.V 2008-06-05 18:51 ` Andreas Dilger -- strict thread matches above, loose matches on Subject: below -- 2008-06-06 18:24 Aneesh Kumar K.V
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox