mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 15:39:42 -04:00
f2fs: multidevice: support direct IO
Commit 3c62be17d4 ("f2fs: support multiple devices") missed
to support direct IO for multiple device feature, this patch
adds to support the missing part of multidevice feature.
In addition, for multiple device image, we should be aware of
any issued direct write IO rather than just buffered write IO,
so that fsync and syncfs can issue a preflush command to the
device where direct write IO goes, to persist user data for
posix compliant.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -570,9 +570,10 @@ TRACE_EVENT(f2fs_file_write_iter,
|
||||
);
|
||||
|
||||
TRACE_EVENT(f2fs_map_blocks,
|
||||
TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int ret),
|
||||
TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map,
|
||||
int create, int flag, int ret),
|
||||
|
||||
TP_ARGS(inode, map, ret),
|
||||
TP_ARGS(inode, map, create, flag, ret),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
@@ -583,11 +584,14 @@ TRACE_EVENT(f2fs_map_blocks,
|
||||
__field(unsigned int, m_flags)
|
||||
__field(int, m_seg_type)
|
||||
__field(bool, m_may_create)
|
||||
__field(bool, m_multidev_dio)
|
||||
__field(int, create)
|
||||
__field(int, flag)
|
||||
__field(int, ret)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev = inode->i_sb->s_dev;
|
||||
__entry->dev = map->m_bdev->bd_dev;
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->m_lblk = map->m_lblk;
|
||||
__entry->m_pblk = map->m_pblk;
|
||||
@@ -595,12 +599,16 @@ TRACE_EVENT(f2fs_map_blocks,
|
||||
__entry->m_flags = map->m_flags;
|
||||
__entry->m_seg_type = map->m_seg_type;
|
||||
__entry->m_may_create = map->m_may_create;
|
||||
__entry->m_multidev_dio = map->m_multidev_dio;
|
||||
__entry->create = create;
|
||||
__entry->flag = flag;
|
||||
__entry->ret = ret;
|
||||
),
|
||||
|
||||
TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
|
||||
"start blkaddr = 0x%llx, len = 0x%llx, flags = %u,"
|
||||
"seg_type = %d, may_create = %d, err = %d",
|
||||
"start blkaddr = 0x%llx, len = 0x%llx, flags = %u, "
|
||||
"seg_type = %d, may_create = %d, multidevice = %d, "
|
||||
"create = %d, flag = %d, err = %d",
|
||||
show_dev_ino(__entry),
|
||||
(unsigned long long)__entry->m_lblk,
|
||||
(unsigned long long)__entry->m_pblk,
|
||||
@@ -608,6 +616,9 @@ TRACE_EVENT(f2fs_map_blocks,
|
||||
__entry->m_flags,
|
||||
__entry->m_seg_type,
|
||||
__entry->m_may_create,
|
||||
__entry->m_multidev_dio,
|
||||
__entry->create,
|
||||
__entry->flag,
|
||||
__entry->ret)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user