diff mbox series

btrfs: remove unused macros in ctree.h

Message ID 20241114152312.2775224-1-maharmstone@fb.com (mailing list archive)
State New
Headers show
Series btrfs: remove unused macros in ctree.h | expand

Commit Message

Mark Harmstone Nov. 14, 2024, 3:22 p.m. UTC
The Private2 #ifdefs in ctree.h for pages are no longer used, as of
commit d71b53c3cb0a. Remove them, and update the comment to be about folios.

Signed-off-by: Mark Harmstone <maharmstone@fb.com>
---
 fs/btrfs/ctree.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

David Sterba Nov. 14, 2024, 4:12 p.m. UTC | #1
On Thu, Nov 14, 2024 at 03:22:53PM +0000, Mark Harmstone wrote:
> The Private2 #ifdefs in ctree.h for pages are no longer used, as of
> commit d71b53c3cb0a. Remove them, and update the comment to be about folios.
> 
> Signed-off-by: Mark Harmstone <maharmstone@fb.com>
> ---
>  fs/btrfs/ctree.h | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 317a3712270f..60c205ac5278 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -744,14 +744,11 @@ const char *btrfs_super_csum_driver(u16 csum_type);
>  size_t __attribute_const__ btrfs_get_num_csums(void);
>  
>  /*
> - * We use page status Private2 to indicate there is an ordered extent with
> + * We use folio status private_2 to indicate there is an ordered extent with
>   * unfinished IO.
>   *
> - * Rename the Private2 accessors to Ordered, to improve readability.
> + * Rename the private_2 accessors to ordered, to improve readability.
>   */
> -#define PageOrdered(page)		PagePrivate2(page)
> -#define SetPageOrdered(page)		SetPagePrivate2(page)
> -#define ClearPageOrdered(page)		ClearPagePrivate2(page)
>  #define folio_test_ordered(folio)	folio_test_private_2(folio)
>  #define folio_set_ordered(folio)	folio_set_private_2(folio)
>  #define folio_clear_ordered(folio)	folio_clear_private_2(folio)

While this is right, there's a patch (now in linux-next)
https://lore.kernel.org/all/20241002040111.1023018-5-willy@infradead.org/
that removes that (with some other updates).
Mark Harmstone Nov. 14, 2024, 5:34 p.m. UTC | #2
Ah, ignore this then. Thanks David

On 14/11/24 16:12, David Sterba wrote:
> > 
> On Thu, Nov 14, 2024 at 03:22:53PM +0000, Mark Harmstone wrote:
>> The Private2 #ifdefs in ctree.h for pages are no longer used, as of
>> commit d71b53c3cb0a. Remove them, and update the comment to be about folios.
>>
>> Signed-off-by: Mark Harmstone <maharmstone@fb.com>
>> ---
>>   fs/btrfs/ctree.h | 7 ++-----
>>   1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
>> index 317a3712270f..60c205ac5278 100644
>> --- a/fs/btrfs/ctree.h
>> +++ b/fs/btrfs/ctree.h
>> @@ -744,14 +744,11 @@ const char *btrfs_super_csum_driver(u16 csum_type);
>>   size_t __attribute_const__ btrfs_get_num_csums(void);
>>   
>>   /*
>> - * We use page status Private2 to indicate there is an ordered extent with
>> + * We use folio status private_2 to indicate there is an ordered extent with
>>    * unfinished IO.
>>    *
>> - * Rename the Private2 accessors to Ordered, to improve readability.
>> + * Rename the private_2 accessors to ordered, to improve readability.
>>    */
>> -#define PageOrdered(page)		PagePrivate2(page)
>> -#define SetPageOrdered(page)		SetPagePrivate2(page)
>> -#define ClearPageOrdered(page)		ClearPagePrivate2(page)
>>   #define folio_test_ordered(folio)	folio_test_private_2(folio)
>>   #define folio_set_ordered(folio)	folio_set_private_2(folio)
>>   #define folio_clear_ordered(folio)	folio_clear_private_2(folio)
> 
> While this is right, there's a patch (now in linux-next)
> https://lore.kernel.org/all/20241002040111.1023018-5-willy@infradead.org/
> that removes that (with some other updates).
Qu Wenruo Nov. 14, 2024, 8:11 p.m. UTC | #3
在 2024/11/15 01:52, Mark Harmstone 写道:
> The Private2 #ifdefs in ctree.h for pages are no longer used, as of
> commit d71b53c3cb0a. Remove them, and update the comment to be about folios.
>
> Signed-off-by: Mark Harmstone <maharmstone@fb.com>

This is going to cause conflicts with the patch migrating private2 to
owner2:

https://lore.kernel.org/linux-btrfs/20241002040111.1023018-5-willy@infradead.org/

And that patch also removes the page opeartions.

Thanks,
Qu
> ---
>   fs/btrfs/ctree.h | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 317a3712270f..60c205ac5278 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -744,14 +744,11 @@ const char *btrfs_super_csum_driver(u16 csum_type);
>   size_t __attribute_const__ btrfs_get_num_csums(void);
>
>   /*
> - * We use page status Private2 to indicate there is an ordered extent with
> + * We use folio status private_2 to indicate there is an ordered extent with
>    * unfinished IO.
>    *
> - * Rename the Private2 accessors to Ordered, to improve readability.
> + * Rename the private_2 accessors to ordered, to improve readability.
>    */
> -#define PageOrdered(page)		PagePrivate2(page)
> -#define SetPageOrdered(page)		SetPagePrivate2(page)
> -#define ClearPageOrdered(page)		ClearPagePrivate2(page)
>   #define folio_test_ordered(folio)	folio_test_private_2(folio)
>   #define folio_set_ordered(folio)	folio_set_private_2(folio)
>   #define folio_clear_ordered(folio)	folio_clear_private_2(folio)
diff mbox series

Patch

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 317a3712270f..60c205ac5278 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -744,14 +744,11 @@  const char *btrfs_super_csum_driver(u16 csum_type);
 size_t __attribute_const__ btrfs_get_num_csums(void);
 
 /*
- * We use page status Private2 to indicate there is an ordered extent with
+ * We use folio status private_2 to indicate there is an ordered extent with
  * unfinished IO.
  *
- * Rename the Private2 accessors to Ordered, to improve readability.
+ * Rename the private_2 accessors to ordered, to improve readability.
  */
-#define PageOrdered(page)		PagePrivate2(page)
-#define SetPageOrdered(page)		SetPagePrivate2(page)
-#define ClearPageOrdered(page)		ClearPagePrivate2(page)
 #define folio_test_ordered(folio)	folio_test_private_2(folio)
 #define folio_set_ordered(folio)	folio_set_private_2(folio)
 #define folio_clear_ordered(folio)	folio_clear_private_2(folio)