From: David Sterba <dsterba@suse.cz>
To: David Sterba <dsterba@suse.cz>
Cc: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs-progs: convert-ext2: insert a dummy inode item before inode ref
Date: Tue, 16 Jan 2024 21:06:57 +0100 [thread overview]
Message-ID: <20240116200657.GF31555@twin.jikos.cz> (raw)
In-Reply-To: <20240116184738.GE31555@twin.jikos.cz>
On Tue, Jan 16, 2024 at 07:47:38PM +0100, David Sterba wrote:
> On Sat, Jan 13, 2024 at 07:07:06PM +1030, Qu Wenruo wrote:
> > -static inline u32 btrfs_type_to_imode(u8 type)
> > -{
> > - static u32 imode_by_btrfs_type[] = {
> > - [BTRFS_FT_REG_FILE] = S_IFREG,
> > - [BTRFS_FT_DIR] = S_IFDIR,
> > - [BTRFS_FT_CHRDEV] = S_IFCHR,
> > - [BTRFS_FT_BLKDEV] = S_IFBLK,
> > - [BTRFS_FT_FIFO] = S_IFIFO,
> > - [BTRFS_FT_SOCK] = S_IFSOCK,
> > - [BTRFS_FT_SYMLINK] = S_IFLNK,
> > - };
> > -
> > - return imode_by_btrfs_type[(type)];
> > -}
>
> Why did you move this helper to utils.h? Here it's available for
> anything that needs it. Mkfs and convert share some code, no style
> problem to cross include from each other. Also moving it to utils.h is
> going the opposite way, it's a header that's a default if there's no
> better place. Lot of code has been factored out of it.
Ok so I confused mkfs and check, the header is from check/ and is not
clean for inclusion in convert due to task_ctx conflict. So I'll keep it
but noted for a future cleanup.
next prev parent reply other threads:[~2024-01-16 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 8:37 [PATCH v2] btrfs-progs: convert-ext2: insert a dummy inode item before inode ref Qu Wenruo
2024-01-16 18:47 ` David Sterba
2024-01-16 20:06 ` David Sterba [this message]
2024-01-16 20:13 ` Qu Wenruo
2024-01-17 0:56 ` 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=20240116200657.GF31555@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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