All of lore.kernel.org
 help / color / mirror / Atom feed
* What is the purpose of EXTENT_PAGE_MAPPED
@ 2017-10-24 10:47 Goldwyn Rodrigues
  2017-10-27  4:17 ` Liu Bo
  0 siblings, 1 reply; 6+ messages in thread
From: Goldwyn Rodrigues @ 2017-10-24 10:47 UTC (permalink / raw)
  To: linux-btrfs


EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
it being cross checked anytime. What is the purpose of setting it?

-- 
Goldwyn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What is the purpose of EXTENT_PAGE_MAPPED
  2017-10-24 10:47 What is the purpose of EXTENT_PAGE_MAPPED Goldwyn Rodrigues
@ 2017-10-27  4:17 ` Liu Bo
  2017-10-30 13:21   ` Nikolay Borisov
  0 siblings, 1 reply; 6+ messages in thread
From: Liu Bo @ 2017-10-27  4:17 UTC (permalink / raw)
  To: Goldwyn Rodrigues; +Cc: linux-btrfs

On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote:
> 
> EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
> it being cross checked anytime. What is the purpose of setting it?

Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was
used to differentiate page for metadata and for data, but I think
currently it's just a piece of legacy code.

-liubo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What is the purpose of EXTENT_PAGE_MAPPED
  2017-10-27  4:17 ` Liu Bo
@ 2017-10-30 13:21   ` Nikolay Borisov
  2017-10-30 13:55     ` David Sterba
  0 siblings, 1 reply; 6+ messages in thread
From: Nikolay Borisov @ 2017-10-30 13:21 UTC (permalink / raw)
  To: bo.li.liu, Goldwyn Rodrigues; +Cc: linux-btrfs



On 27.10.2017 07:17, Liu Bo wrote:
> On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote:
>>
>> EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
>> it being cross checked anytime. What is the purpose of setting it?
> 
> Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was
> used to differentiate page for metadata and for data, but I think
> currently it's just a piece of legacy code.

Be that as it may - is there any reason why we are keeping this and can
it be killed off?

> 
> -liubo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What is the purpose of EXTENT_PAGE_MAPPED
  2017-10-30 13:21   ` Nikolay Borisov
@ 2017-10-30 13:55     ` David Sterba
  2017-10-30 14:01       ` Nikolay Borisov
  0 siblings, 1 reply; 6+ messages in thread
From: David Sterba @ 2017-10-30 13:55 UTC (permalink / raw)
  To: Nikolay Borisov; +Cc: bo.li.liu, Goldwyn Rodrigues, linux-btrfs

On Mon, Oct 30, 2017 at 03:21:51PM +0200, Nikolay Borisov wrote:
> 
> 
> On 27.10.2017 07:17, Liu Bo wrote:
> > On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote:
> >>
> >> EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
> >> it being cross checked anytime. What is the purpose of setting it?
> > 
> > Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was
> > used to differentiate page for metadata and for data, but I think
> > currently it's just a piece of legacy code.
> 
> Be that as it may - is there any reason why we are keeping this and can
> it be killed off?

Are we're talking about EXTENT_PAGE_PRIVATE? There's no
EXTENT_PAGE_MAPPED. There's some control dependency on the page private
bit and the value, so we should be careful and replace the function with
an assert (or a BUG_ON if it's a must-not-happen state). The page->private
points to an extent buffer, and if it's always an eb, then the
EXTENT_PAGE_PRIVATE is unused.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What is the purpose of EXTENT_PAGE_MAPPED
  2017-10-30 13:55     ` David Sterba
@ 2017-10-30 14:01       ` Nikolay Borisov
  2017-10-30 14:04         ` Goldwyn Rodrigues
  0 siblings, 1 reply; 6+ messages in thread
From: Nikolay Borisov @ 2017-10-30 14:01 UTC (permalink / raw)
  To: dsterba, bo.li.liu, Goldwyn Rodrigues, linux-btrfs



On 30.10.2017 15:55, David Sterba wrote:
> On Mon, Oct 30, 2017 at 03:21:51PM +0200, Nikolay Borisov wrote:
>>
>>
>> On 27.10.2017 07:17, Liu Bo wrote:
>>> On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote:
>>>>
>>>> EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
>>>> it being cross checked anytime. What is the purpose of setting it?
>>>
>>> Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was
>>> used to differentiate page for metadata and for data, but I think
>>> currently it's just a piece of legacy code.
>>
>> Be that as it may - is there any reason why we are keeping this and can
>> it be killed off?
> 
> Are we're talking about EXTENT_PAGE_PRIVATE? There's no
> EXTENT_PAGE_MAPPED. There's some control dependency on the page private
> bit and the value, so we should be careful and replace the function with
> an assert (or a BUG_ON if it's a must-not-happen state). The page->private
> points to an extent buffer, and if it's always an eb, then the
>EXTENT_PAGE_PRIVATE is unused.

I guess I meant do we actually need: set_page_extent_mapped and all the
jazz happening in it  or is it a leftover (which I believe it is) ?

> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: What is the purpose of EXTENT_PAGE_MAPPED
  2017-10-30 14:01       ` Nikolay Borisov
@ 2017-10-30 14:04         ` Goldwyn Rodrigues
  0 siblings, 0 replies; 6+ messages in thread
From: Goldwyn Rodrigues @ 2017-10-30 14:04 UTC (permalink / raw)
  To: Nikolay Borisov, dsterba, bo.li.liu, linux-btrfs



On 10/30/2017 09:01 AM, Nikolay Borisov wrote:
> 
> 
> On 30.10.2017 15:55, David Sterba wrote:
>> On Mon, Oct 30, 2017 at 03:21:51PM +0200, Nikolay Borisov wrote:
>>>
>>>
>>> On 27.10.2017 07:17, Liu Bo wrote:
>>>> On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote:
>>>>>
>>>>> EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see
>>>>> it being cross checked anytime. What is the purpose of setting it?
>>>>
>>>> Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was
>>>> used to differentiate page for metadata and for data, but I think
>>>> currently it's just a piece of legacy code.
>>>
>>> Be that as it may - is there any reason why we are keeping this and can
>>> it be killed off?
>>
>> Are we're talking about EXTENT_PAGE_PRIVATE? There's no
>> EXTENT_PAGE_MAPPED. There's some control dependency on the page private
>> bit and the value, so we should be careful and replace the function with
>> an assert (or a BUG_ON if it's a must-not-happen state). The page->private
>> points to an extent buffer, and if it's always an eb, then the
>> EXTENT_PAGE_PRIVATE is unused.
> 
> I guess I meant do we actually need: set_page_extent_mapped and all the
> jazz happening in it  or is it a leftover (which I believe it is) ?
> 

We definitely need set_page_extent_mapped() to set the page private for
the lowers layers to handle I/O, primarily writebacks. However, we may
not need EXTENT_PAGE_PRIVATE (yes, I got it wrong the first time). I am
still reading on this though.


-- 
Goldwyn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-30 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 10:47 What is the purpose of EXTENT_PAGE_MAPPED Goldwyn Rodrigues
2017-10-27  4:17 ` Liu Bo
2017-10-30 13:21   ` Nikolay Borisov
2017-10-30 13:55     ` David Sterba
2017-10-30 14:01       ` Nikolay Borisov
2017-10-30 14:04         ` Goldwyn Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.