From: David Sterba <dsterba@suse.cz>
To: David Sterba <dsterba@suse.cz>
Cc: Srivathsa Dara <srivathsa.d.dara@oracle.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Rajesh Sivaramasubramaniom
<rajesh.sivaramasubramaniom@oracle.com>,
Junxiao Bi <junxiao.bi@oracle.com>, "clm@fb.com" <clm@fb.com>,
"josef@toxicpanda.com" <josef@toxicpanda.com>,
"dsterba@suse.com" <dsterba@suse.com>
Subject: Re: [PATCH v2] btrfs-progs: convert: Add 64 bit block numbers support
Date: Thu, 13 Jun 2024 02:02:00 +0200 [thread overview]
Message-ID: <20240613000200.GS18508@twin.jikos.cz> (raw)
In-Reply-To: <20240612203743.GQ18508@twin.jikos.cz>
On Wed, Jun 12, 2024 at 10:37:43PM +0200, David Sterba wrote:
> On Tue, Jun 11, 2024 at 06:03:30AM +0000, Srivathsa Dara wrote:
> > > 在 2024/6/6 19:52, Srivathsa Dara 写道:
> > > > if (err)
> > > > goto error;
> > > > diff --git a/convert/source-ext2.h b/convert/source-ext2.h index
> > > > d204aac5..62c9b1fa 100644
> > > > --- a/convert/source-ext2.h
> > > > +++ b/convert/source-ext2.h
> > > > @@ -46,7 +46,7 @@ struct btrfs_trans_handle;
> > > > #define ext2fs_get_block_bitmap_range2 ext2fs_get_block_bitmap_range
> > > > #define ext2fs_inode_data_blocks2 ext2fs_inode_data_blocks
> > > > #define ext2fs_read_ext_attr2 ext2fs_read_ext_attr
> > > > -#define ext2fs_blocks_count(s) ((s)->s_blocks_count)
> > > > +#define ext2fs_blocks_count(s) (((s)->s_blocks_count_hi << 32) | (s)->s_blocks_count)
> > >
> > > This is definitely needed, or it would trigger the ASSERT().
> > >
> > > But again, the newer btrfs-progs no longer go with internally defined ext2fs_blocks_count(), but using the one from e2fsprogs headers, and the library version is already returning blk64_t.
> >
> > Okay, got it.
> >
> > Tested the code base with the commit c23e068aaf91, it does handle 64 bit block numbers.
>
> So, is this patch still needed? I'm not sure after Qu fixed the
> iteration, the tests pass without the patch too.
Locally the test succeeds (e2fsprogs 1.47.0), however in the github CI
it fails with:
mke2fs -t ext4 -b 4096 -F /home/runner/work/btrfs-progs/btrfs-progs/tests/test.img
mke2fs 1.46.5 (30-Dec-2021)
mke2fs: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
This is the updated test case 018-fs-size-overflow and in the code the change
is the updated definition of ext2fs_blocks_count.
I'll put the test case to a topic branch and remove it from devel so the
CI can be used. You can open a pull request to verify if things work.
next prev parent reply other threads:[~2024-06-13 0:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 10:22 [PATCH v2] btrfs-progs: convert: Add 64 bit block numbers support Srivathsa Dara
2024-06-06 22:28 ` Qu Wenruo
2024-06-11 6:03 ` Srivathsa Dara
2024-06-12 20:37 ` David Sterba
2024-06-13 0:02 ` David Sterba [this message]
2024-06-13 0:10 ` Qu Wenruo
2024-06-13 0:23 ` David Sterba
2024-06-13 0:25 ` Qu Wenruo
2024-06-13 0:52 ` David Sterba
2024-06-13 1:23 ` David Sterba
2024-06-13 18:27 ` [External] : " Srivathsa Dara
2024-06-13 18:32 ` Srivathsa Dara
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=20240613000200.GS18508@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=junxiao.bi@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=rajesh.sivaramasubramaniom@oracle.com \
--cc=srivathsa.d.dara@oracle.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