Searched hist:fdf250db (Results 1 - 2 of 2) sorted by last modified time

/linux-master/fs/btrfs/
H A Dextent_io.cdiff fdf250db Tue Aug 17 03:38:49 MDT 2021 Qu Wenruo <wqu@suse.com> btrfs: subpage: only call btrfs_alloc_subpage() when sectorsize is smaller than PAGE_SIZE

There are two call sites of btrfs_alloc_subpage():

- btrfs_attach_subpage()
We have ensured sectorsize is smaller than PAGE_SIZE

- alloc_extent_buffer()
We call btrfs_alloc_subpage() unconditionally.

The alloc_extent_buffer() forces us to check the sectorsize size against
page size inside btrfs_alloc_subpage().

Since the function name, btrfs_alloc_subpage(), already indicates it
should only get called for subpage cases, do the check in
alloc_extent_buffer() and add an ASSERT() in btrfs_alloc_subpage().

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
H A Dsubpage.cdiff fdf250db Tue Aug 17 03:38:49 MDT 2021 Qu Wenruo <wqu@suse.com> btrfs: subpage: only call btrfs_alloc_subpage() when sectorsize is smaller than PAGE_SIZE

There are two call sites of btrfs_alloc_subpage():

- btrfs_attach_subpage()
We have ensured sectorsize is smaller than PAGE_SIZE

- alloc_extent_buffer()
We call btrfs_alloc_subpage() unconditionally.

The alloc_extent_buffer() forces us to check the sectorsize size against
page size inside btrfs_alloc_subpage().

Since the function name, btrfs_alloc_subpage(), already indicates it
should only get called for subpage cases, do the check in
alloc_extent_buffer() and add an ASSERT() in btrfs_alloc_subpage().

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

Completed in 377 milliseconds