From: ctdk <jbingham@gmail.com>
To: hch@infradead.org
Cc: brauner@kernel.org, djwong@kernel.org, jack@suse.cz,
jbingham@gmail.com, jkoolstra@xs4all.nl,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] minix: unify the v1 and v2/v3 itree code paths
Date: Thu, 24 Sep 2026 12:17:33 -0700 [thread overview]
Message-ID: <20260924191733.433874-1-jbingham@gmail.com> (raw)
In-Reply-To: <arJ8Mpef2gSLvKos@infradead.org>
On Tue, 22 Sep 2026 at 06:01:38 -0700, Christoph Hellwig wrote:
> I think this is a good idea, and should make the code more maintainable
> forward, as well as simply your iomap conversion.
It should help immensely with both of those things, I think. More than
one reviewer of the iomap conversion has been left scratching their
heads over the weird tricks both required for the iomap conversion and
simply already present in the module.
> A few comments:
>
> > + /* Set the direct block and indirect block depth now that the rest of
> > + * the version-specific settings have been set.
> > + */
>
> Please use the normal kernel comment style:
>
> /*
> * Set the direct block and indirect block depth now that the rest of
> * the version-specific settings have been set.
> */
>
> > + sbi->s_direct = MINIX_DIRECT; /* Always the same. */
>
> No need for the comment I think.
As I believe I said somewhere, I explicitly loaded this RFC patch to
explain what I was doing since I was looking for comments on it. I
erred on the side of verbosity because I was looking to undo something
that had been this way for at least 21 years, and probably much longer.
I was already planning on stripping the excess comments out, but thank
you for the reminders about style and line length. This applies to all
the comment and style comments below, to save space.
> > generic_fillattr(&nop_mnt_idmap, request_mask, inode, stat);
> > if (INODE_VERSION(inode) == MINIX_V1)
> > - stat->blocks = (BLOCK_SIZE / 512) * V1_minix_blocks(stat->size, sb);
> > + stat->blocks = (BLOCK_SIZE / 512) * minix_blocks(stat->size, sb);
> > else
> > - stat->blocks = (sb->s_blocksize / 512) * V2_minix_blocks(stat->size, sb);
> > + stat->blocks = (sb->s_blocksize / 512) * minix_blocks(stat->size, sb);
>
> v1 always sets s_blocksize to BLOCK_SIZE, so this can simply become and
> unconditional:
>
> stat->blocks = (sb->s_blocksize / 512) * minix_blocks(stat->size, sb);
Noted.
> > +extern int minix_get_block(struct inode *inode, sector_t block,
> > + struct buffer_head *bh, int create);
> > +extern unsigned int minix_blocks(loff_t size, struct super_block *sb);
>
> Please drop the extern for all function declarations that you touch.
I figured out that we no longer need to have 'extern' in the header
declarations after I submitted this patch, but thank you for the
reminder.
Somehow this reply hasn't shown up in my inbox yet, but fortunately I
was able to find it. I'll get this turned around and send out the new
and improved versio shortly.
Thanks again,
-j
prev parent reply other threads:[~2026-09-24 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 8:35 [RFC PATCH 0/1] minix: unify itree_v1, itree_v2, and itree_common Jeremy Bingham
2026-07-06 8:35 ` [RFC PATCH 1/1] minix: unify the v1 and v2/v3 itree code paths Jeremy Bingham
2026-09-22 13:01 ` Christoph Hellwig
2026-09-24 19:17 ` ctdk [this message]
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=20260924191733.433874-1-jbingham@gmail.com \
--to=jbingham@gmail.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jkoolstra@xs4all.nl \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®