mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: sysfs: fix format string for some discard stats
The type of discard_bitmap_bytes and discard_extent_bytes is u64 so the format should be %llu, though the actual values would hardly ever overflow to negative values. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5963ffcaf3
commit
8c5ec99561
1 changed files with 2 additions and 2 deletions
|
@ -429,7 +429,7 @@ static ssize_t btrfs_discard_bitmap_bytes_show(struct kobject *kobj,
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj);
|
struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj);
|
||||||
|
|
||||||
return scnprintf(buf, PAGE_SIZE, "%lld\n",
|
return scnprintf(buf, PAGE_SIZE, "%llu\n",
|
||||||
fs_info->discard_ctl.discard_bitmap_bytes);
|
fs_info->discard_ctl.discard_bitmap_bytes);
|
||||||
}
|
}
|
||||||
BTRFS_ATTR(discard, discard_bitmap_bytes, btrfs_discard_bitmap_bytes_show);
|
BTRFS_ATTR(discard, discard_bitmap_bytes, btrfs_discard_bitmap_bytes_show);
|
||||||
|
@ -451,7 +451,7 @@ static ssize_t btrfs_discard_extent_bytes_show(struct kobject *kobj,
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj);
|
struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj);
|
||||||
|
|
||||||
return scnprintf(buf, PAGE_SIZE, "%lld\n",
|
return scnprintf(buf, PAGE_SIZE, "%llu\n",
|
||||||
fs_info->discard_ctl.discard_extent_bytes);
|
fs_info->discard_ctl.discard_extent_bytes);
|
||||||
}
|
}
|
||||||
BTRFS_ATTR(discard, discard_extent_bytes, btrfs_discard_extent_bytes_show);
|
BTRFS_ATTR(discard, discard_extent_bytes, btrfs_discard_extent_bytes_show);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue