mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz
Cc: zys.zljxml@gmail.com, clm@fb.com, josef@toxicpanda.com,
	dsterba@suse.com, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Yushan Zhou <katrinzhou@tencent.com>
Subject: Re: [PATCH v3] btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro
Date: Thu, 12 Jan 2023 07:27:32 +0800	[thread overview]
Message-ID: <685f8fbc-5e61-d230-767f-e69784111b88@gmx.com> (raw)
In-Reply-To: <20230111184037.GI11562@twin.jikos.cz>



On 2023/1/12 02:40, David Sterba wrote:
> On Tue, Jan 03, 2023 at 01:47:43PM +0800, Qu Wenruo wrote:
>>
>>
>> On 2023/1/3 13:11, zys.zljxml@gmail.com wrote:
>>> From: Yushan Zhou <katrinzhou@tencent.com>
>>>
>>> The header file linux/mm.h provides PAGE_ALIGN, PAGE_ALIGNED,
>>> PAGE_ALIGN_DOWN macros. Use these macros to make code more
>>> concise.
>>
>> Is there anything benefit from the change?
>>
>> In fact, PAGE_ALIGN()/PAGE_ALIGNED() is just using the same
>> ALIGN()/IS_ALIGNED() macro.
>>
>> Thus I don't think your change is of any usefulness, not to mention it's
>> going to introduce confusion and extra effort.
>>
>> I'm completely fine with regular ALIGN()/IS_ALIGNED() usage with PAGE_SIZE.
> 
> We already have PAGE_ALIGN in some places and I think it's a bit better
> than the ALIGN/IS_ALIGN as it's clear that it's for a page.

I'd argue that PAGE_ALIGN() is good for MM code, which btrfs has some.

But overall, btrfs is more about sector alignment, and if we need to mix 
them, regular ALIGN() would be more flex.

Thanks,
Qu

  reply	other threads:[~2023-01-11 23:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03  5:11 zys.zljxml
2023-01-03  5:47 ` Qu Wenruo
2023-01-11 18:40   ` David Sterba
2023-01-11 23:27     ` Qu Wenruo [this message]
2023-01-11 18:37 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=685f8fbc-5e61-d230-767f-e69784111b88@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=katrinzhou@tencent.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zys.zljxml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®