Re: [RFC 02/23] pagemap: use mapping_min_order in fgf_set_order()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-09-15 20:55, Matthew Wilcox wrote:
> On Fri, Sep 15, 2023 at 08:38:27PM +0200, Pankaj Raghav wrote:
>> From: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
>>
>> fgf_set_order() encodes optimal order in fgp flags. Set it to at least
>> mapping_min_order from the page cache. Default to the old behaviour if
>> min_order is not set.
> 
> Why not simply:
> 

That is a good idea to move this to filemap instead of changing it in iomap. I will do that!

> +++ b/mm/filemap.c
> @@ -1906,9 +1906,12 @@ struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index,
>                 folio_wait_stable(folio);
>  no_page:
>         if (!folio && (fgp_flags & FGP_CREAT)) {
> -               unsigned order = FGF_GET_ORDER(fgp_flags);
> +               unsigned order;
>                 int err;
> 
> +               order = min(mapping_min_folio_order(mapping),
> +                               FGF_GET_ORDER(fgp_flags));
> 

I think this needs to max(mapping..., FGF...)



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux