inode.c (c6f40468657d16e4010ef84bf32a761feb3469ea) | inode.c (952da06375c8f3aa58474fff718d9ae8442531b9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/ext4/inode.c 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 3335 unchanged lines hidden (view full) --- 3344 handle = ext4_journal_start(inode, EXT4_HT_MAP_BLOCKS, dio_credits); 3345 if (IS_ERR(handle)) 3346 return PTR_ERR(handle); 3347 3348 /* 3349 * DAX and direct I/O are the only two operations that are currently 3350 * supported with IOMAP_WRITE. 3351 */ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/ext4/inode.c 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 3335 unchanged lines hidden (view full) --- 3344 handle = ext4_journal_start(inode, EXT4_HT_MAP_BLOCKS, dio_credits); 3345 if (IS_ERR(handle)) 3346 return PTR_ERR(handle); 3347 3348 /* 3349 * DAX and direct I/O are the only two operations that are currently 3350 * supported with IOMAP_WRITE. 3351 */ |
3352 WARN_ON(!IS_DAX(inode) && !(flags & IOMAP_DIRECT)); 3353 if (IS_DAX(inode)) | 3352 WARN_ON(!(flags & (IOMAP_DAX | IOMAP_DIRECT))); 3353 if (flags & IOMAP_DAX) |
3354 m_flags = EXT4_GET_BLOCKS_CREATE_ZERO; 3355 /* 3356 * We use i_size instead of i_disksize here because delalloc writeback 3357 * can complete at any point during the I/O and subsequently push the 3358 * i_disksize out to i_size. This could be beyond where direct I/O is 3359 * happening and thus expose allocated blocks to direct I/O reads. 3360 */ 3361 else if (((loff_t)map->m_lblk << blkbits) >= i_size_read(inode)) --- 2801 unchanged lines hidden --- | 3354 m_flags = EXT4_GET_BLOCKS_CREATE_ZERO; 3355 /* 3356 * We use i_size instead of i_disksize here because delalloc writeback 3357 * can complete at any point during the I/O and subsequently push the 3358 * i_disksize out to i_size. This could be beyond where direct I/O is 3359 * happening and thus expose allocated blocks to direct I/O reads. 3360 */ 3361 else if (((loff_t)map->m_lblk << blkbits) >= i_size_read(inode)) --- 2801 unchanged lines hidden --- |