All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: David Disseldorp <ddiss@suse.de>
Cc: Jan Kara <jack@suse.cz>, fstests@vger.kernel.org
Subject: Re: [PATCH v2 1/2] common: Provide blocksize and ecclength to udf fsck
Date: Fri, 20 Jan 2023 17:47:57 +0100	[thread overview]
Message-ID: <20230120164757.tcxgw2wbnq46vuyw@quack3> (raw)
In-Reply-To: <20230120173454.31cdd5d5@echidna.fritz.box>

On Fri 20-01-23 17:34:54, David Disseldorp wrote:
> On Fri, 20 Jan 2023 16:50:29 +0100, Jan Kara wrote:
> 
> > udf_test program used for verifying filesystem is not able to determine
> > filesystem blocksize. Provide it in the options together with disabling
> > ecclength as it is not used on harddrives.
> > 
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> >  common/rc | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/common/rc b/common/rc
> > index 8060c03b7d18..bf3effa4c1ed 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -3075,9 +3075,13 @@ _check_udf_filesystem()
> >      fi
> >  
> >      local device=$1
> > -    local opt_arg=""
> > +    local blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*(-b|--blocksize)[ =]?+([0-9]+).*/\2/p'`
> > +    if [ -z "$blksz" ]; then
> > +	blksz=512
> > +    fi
> > +    local opt_arg="-ecclength 1 -blocksize $blksz"
> >      if [ $# -eq 2 ]; then
> > -	opt_arg="-lastvalidblock $(( $2 - 1 ))"
> > +	opt_arg+=" -lastvalidblock $(( $2 - 1 ))"
> >      fi
> >  
> >      rm -f $seqres.checkfs
> 
> Looks fine - I suppose it's safe to assume the --media-type=hd default
> blksz value.
> Reviewed-by: David Disseldorp <ddiss@suse.de>

Thanks for review! Yeah, I didn't really find a value in trying to handle
anything else. If a real usecase comes, we can always tweak this.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2023-01-20 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 15:50 [PATCH v2 0/2] fstests: Fix checking of UDF filesystems Jan Kara
2023-01-20 15:50 ` [PATCH v2 1/2] common: Provide blocksize and ecclength to udf fsck Jan Kara
2023-01-20 16:34   ` David Disseldorp
2023-01-20 16:47     ` Jan Kara [this message]
2023-01-20 15:50 ` [PATCH v2 2/2] common: Unmount udf filesystem prior checking Jan Kara

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=20230120164757.tcxgw2wbnq46vuyw@quack3 \
    --to=jack@suse.cz \
    --cc=ddiss@suse.de \
    --cc=fstests@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.