On Tue, Jun 03, 2008 at 10:59:37PM +0530, Aneesh Kumar K.V wrote: > 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. > Needs this change to get fsstress running. diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 2e485a3..787ce99 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1565,7 +1565,8 @@ 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); /* * Update on-disk size along with block allocation -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html