Re: [PATCH 3/6 ]Ext4: journal credits reservation fixes for DIO, fallocate
From: Aneesh Kumar K.V <hidden>
Date: 2008-08-13 10:18:38
On Wed, Aug 13, 2008 at 02:23:07PM +0530, Aneesh Kumar K.V wrote:
quoted
if (create && !handle) { /* Direct IO write... */ if (max_blocks > DIO_MAX_BLOCKS) max_blocks = DIO_MAX_BLOCKS; - handle = ext4_journal_start(inode, DIO_CREDITS + - 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb)); + dio_credits = ext4_data_trans_blocks(inode, max_blocks); + handle = ext4_journal_start(inode, dio_credits);Even in data=journal mode directIO will put the buffer_heads to journal right ? . So should we use ext4_data_trans_blocks here ?
That should be Even in data=journal mode directIO will NOT put the buffer_heads to journal
quoted
if (IS_ERR(handle)) { ret = PTR_ERR(handle); goto out;@@ -2222,7 +2214,7 @@ static int ext4_da_writepage(struct page * for DIO, writepages, and truncate */ #define EXT4_MAX_WRITEBACK_PAGES DIO_MAX_BLOCKS -#define EXT4_MAX_WRITEBACK_CREDITS DIO_CREDITS +#define EXT4_MAX_WRITEBACK_CREDITS 25 static int ext4_da_writepages(struct address_space *mapping, struct writeback_control *wbc)@@ -4429,7 +4421,8 @@ static int ext4_writeblocks_trans_credit
-aneesh