• M
    ext4: journal credits reservation fixes for DIO, fallocate · f3bd1f3f
    Mingming Cao 提交于
    DIO and fallocate credit calculation is different than writepage, as
    they do start a new journal right for each call to ext4_get_blocks_wrap().
    This patch uses the helper function in DIO and fallocate case, passing
    a flag indicating that the modified data are contigous thus could account
    less indirect/index blocks.
    
    This patch also fixed the journal credit reservation for direct I/O
    (DIO).  Previously the estimated credits for DIO only was calculated for
    non-extent files, which was not enough if the file is extent-based.
    
    Also fixed was fallocate double-counting credits for modifying the the
    superblock.
    Signed-off-by: NMingming Cao <cmm@us.ibm.com>
    Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
    f3bd1f3f
extents.c 75.9 KB