Message ID | 20240327074223.2216487-1-chao@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 33e62cd7b4c281cd737c62e5d8c4f0e602a8c5c5 |
Headers | show |
Series | [f2fs-dev,v2] f2fs: multidev: fix to recognize valid zero block address | expand |
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Wed, 27 Mar 2024 15:42:23 +0800 you wrote: > As reported by Yi Zhang in mailing list [1], kernel warning was catched > during zbd/010 test as below: > > ./check zbd/010 > zbd/010 (test gap zone support with F2FS) [failed] > runtime ... 3.752s > something found in dmesg: > [ 4378.146781] run blktests zbd/010 at 2024-02-18 11:31:13 > [ 4378.192349] null_blk: module loaded > [ 4378.209860] null_blk: disk nullb0 created > [ 4378.413285] scsi_debug:sdebug_driver_probe: scsi_debug: trim > poll_queues to 0. poll_q/nr_hw = (0/1) > [ 4378.422334] scsi host15: scsi_debug: version 0191 [20210520] > dev_size_mb=1024, opts=0x0, submit_queues=1, statistics=0 > [ 4378.434922] scsi 15:0:0:0: Direct-Access-ZBC Linux > scsi_debug 0191 PQ: 0 ANSI: 7 > [ 4378.443343] scsi 15:0:0:0: Power-on or device reset occurred > [ 4378.449371] sd 15:0:0:0: Attached scsi generic sg5 type 20 > [ 4378.449418] sd 15:0:0:0: [sdf] Host-managed zoned block device > ... > (See '/mnt/tests/gitlab.com/api/v4/projects/19168116/repository/archive.zip/storage/blktests/blk/blktests/results/nodev/zbd/010.dmesg' > > [...] Here is the summary with links: - [f2fs-dev,v2] f2fs: multidev: fix to recognize valid zero block address https://git.kernel.org/jaegeuk/f2fs/c/33e62cd7b4c2 You are awesome, thank you!
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 08815394223a..fa5398ac4505 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -4196,7 +4196,7 @@ static int f2fs_iomap_begin(struct inode *inode, loff_t offset, loff_t length, if (WARN_ON_ONCE(map.m_pblk == COMPRESS_ADDR)) return -EINVAL; - if (map.m_pblk != NULL_ADDR) { + if (map.m_flags & F2FS_MAP_MAPPED) { iomap->length = blks_to_bytes(inode, map.m_len); iomap->type = IOMAP_MAPPED; iomap->flags |= IOMAP_F_MERGED;