Skip to contentSkip to conversation

What is the purpose of EXTENT_PAGE_MAPPED

DISCUSSION Goldwyn Rodrigues 4 participants 6 messages Oct 24, 2017 – Oct 30, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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?

Signature · 1 line
Goldwyn
#1 lore raw
Quoted 3 lines · Goldwyn Rodrigues

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

#2 lore raw
Quoted 8 lines · Liu Bo
Quoted 3 lines · Goldwyn Rodrigues

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?

Quoted 7 lines

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

#3 lore raw
Quoted 8 lines · Nikolay Borisov
Quoted 5 lines · Liu Bo
Quoted 3 lines · Goldwyn Rodrigues

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?

Quoted 6 lines
Quoted 3 lines

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.

#4 lore raw
Quoted 16 lines · David Sterba
Quoted 8 lines · Nikolay Borisov
Quoted 5 lines · Liu Bo
Quoted 3 lines · Goldwyn Rodrigues

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?

Quoted 6 lines
Quoted 3 lines

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?

Quoted 6 lines

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) ?

Quoted 1 line
#5 lore raw
Quoted 26 lines · Nikolay Borisov
Quoted 16 lines · David Sterba
Quoted 8 lines · Nikolay Borisov
Quoted 5 lines · Liu Bo
Quoted 3 lines · Goldwyn Rodrigues

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?

Quoted 6 lines
Quoted 3 lines

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?

Quoted 6 lines

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.

Quoted 3 lines

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.

Signature · 1 line
Goldwyn