Marcelo Tosatti wrote:
>
> Hi,
>
> I noticed that _pagebuf_lookup_pages() may use two different allocation
> flags to allocate invalid pages depending on PBF_MAPPABLE flag:
>
> /* For pagebufs where we want to map an address, do not use
> * highmem pages - so that we do not need to use kmap resources
> * to access the data.
> */
>
> if (flags & PBF_MAPPABLE) {
> gfp_mask = GFP_BUFFER;
> } else {
> gfp_mask = GFP_HIGHUSER;
> }
>
> My question is if only when the caller sets PBF_MAPPABLE it may hold some
> fs lock? (thats why GFP_BUFFER was used, I suppose)
PBF_MAPPABLE is used by meta data users ... XFS keeps its
meta data in pages hashed to the mount-point inode.
All other callers, basically the file I/O paths, don't use MAPPABLE.
For example, _pb_buffered_read would not use MAPPABLE.
>
> If callers which do not set PBF_MAPPABLE may have locks which are used on
> the ->writepage() codepath, it may be a problem (deadlock).
>
Can you please elaborate on the deadlock scenario?
--
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
|