linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
	Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Christophe Vu-Brugier <christophe.vu-brugier@seagate.com>
Subject: Re: [PATCH 1/1] exfat: fix i_blocks for files truncated over 4 GiB
Date: Thu, 18 Nov 2021 23:43:17 +0100	[thread overview]
Message-ID: <8bd90de5-0b1e-f9f3-38b3-038d73adf3d7@fastmail.fm> (raw)
In-Reply-To: <YZbKobiUUt6eG6zQ@casper.infradead.org>

Hi Matthew,

Le 18/11/2021 à 22:50, Matthew Wilcox a écrit :
> On Thu, Nov 18, 2021 at 10:28:28PM +0100, Christophe Vu-Brugier wrote:
>>   	inode->i_blocks = ((i_size_read(inode) + (sbi->cluster_size - 1)) &
>> -			~(sbi->cluster_size - 1)) >> inode->i_blkbits;
>> +		~((loff_t)sbi->cluster_size - 1)) >> inode->i_blkbits;
> 
> Isn't this a convoluted way to write:
> 
> 	inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >>
> 				inode->i_blkbits;
> ?

Yes, it is. And we have evidence that it is more error prone.

I will update my patch with what you suggest.

Thanks!

-- 
Christophe Vu-Brugier

  reply	other threads:[~2021-11-18 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 21:28 [PATCH 0/1] exfat: fix i_blocks for files truncated over 4 GiB Christophe Vu-Brugier
2021-11-18 21:28 ` [PATCH 1/1] " Christophe Vu-Brugier
2021-11-18 21:50   ` Matthew Wilcox
2021-11-18 22:43     ` Christophe Vu-Brugier [this message]
2021-11-19 17:37     ` [PATCH v2] " Christophe Vu-Brugier
2021-11-22  2:10       ` Sungjong Seo
2021-11-22  2:33         ` Namjae Jeon

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=8bd90de5-0b1e-f9f3-38b3-038d73adf3d7@fastmail.fm \
    --to=cvubrugier@fastmail.fm \
    --cc=christophe.vu-brugier@seagate.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).