diff options
| author | Baokun Li <libaokun1@huawei.com> | 2025-11-21 17:06:39 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-11-28 22:35:27 -0500 |
| commit | 125d1f6a5a77ed6a1af3eb0957240f54e4124af2 (patch) | |
| tree | f5e95a30b7cd13b12c180eadba3fd4673d00f7f6 /fs/ext4/ext4.h | |
| parent | 609c5e0081b432caaa557ffcf1318aefe1187c4e (diff) | |
ext4: add EXT4_LBLK_TO_B macro for logical block to bytes conversion
No functional changes.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Message-ID: <20251121090654.631996-10-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
| -rw-r--r-- | fs/ext4/ext4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 0502afa6f6e5..4581ff8aef19 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -368,6 +368,7 @@ struct ext4_io_submit { blkbits)) #define EXT4_B_TO_LBLK(inode, offset) \ (round_up((offset), i_blocksize(inode)) >> (inode)->i_blkbits) +#define EXT4_LBLK_TO_B(inode, lblk) ((loff_t)(lblk) << (inode)->i_blkbits) /* Translate a block number to a cluster number */ #define EXT4_B2C(sbi, blk) ((blk) >> (sbi)->s_cluster_bits) |