All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: Don't keep silent if sunit/swidth can not be changed via mount
Date: Tue, 30 Apr 2013 21:35:14 +1000	[thread overview]
Message-ID: <20130430113514.GA10481@dastard> (raw)
In-Reply-To: <517F78D2.5020503@oracle.com>

On Tue, Apr 30, 2013 at 03:54:58PM +0800, Jeff Liu wrote:
> On 04/30/2013 03:36 PM, Dave Chinner wrote:
> > On Mon, Apr 29, 2013 at 07:44:18PM +0800, Jeff Liu wrote:
> >> ---
> >>  fs/xfs/xfs_mount.c |    7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>
> >> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> >> index 3806088..bc7fdd4 100644
> >> --- a/fs/xfs/xfs_mount.c
> >> +++ b/fs/xfs/xfs_mount.c
> >> @@ -924,6 +924,13 @@ xfs_update_alignment(xfs_mount_t *mp)
> >>  				sbp->sb_width = mp->m_swidth;
> >>  				mp->m_update_flags |= XFS_SB_WIDTH;
> >>  			}
> >> +		} else {
> >> +			xfs_warn(mp, "can not change alignment: "
> >> +				"no data alignment on superblock");
> >> +			if (mp->m_flags & XFS_MOUNT_RETERR)
> >> +				return XFS_ERROR(EINVAL);
> >> +			mp->m_dalign = 0;
> >> +			mp->m_swidth = 0;
> > 
> > Can someone tell me why the XFS_MOUNT_RETERR flag exists?
> This is really a very opportune response because I also worked out
> another tiny patch for removing XFS_MOUNT_RETERR a few minutes ago,
> just hesitating if I missed anything or not.

Excellent - you're one step ahead of me :)

> > It looks like dead code to me as the only time mp->m_dalign is set
> > prior to calling xfs_update_alignment() is the same code that sets
> > XFS_MOUNT_RETERR in xfs_parseargs().
> > 
> > IOWs, any time we enter this "if (mp->m_dalign)" branch in
> > xfs_update_alignment(), XFS_MOUNT_RETERR is going to be set and so
> > we should always be emitting a warning and returning an error.
> Yes, I realized that as I can not trigger a warning only, it always
> returning an error to me. :(
> > 
> > If this is correct, Jeff, can you remove the XFS_MOUNT_RETERR flag
> > and get rid of all the dead code in xfs_update_alignment() at the
> > same time, please?
> Sure, I'll post this patch tonight together with another initial patch
> for fixing transaction space over-reservation we have discussed two
> weeks ago, xfstests is running now.

I'll have a look when it appears on the list ;)

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2013-04-30 11:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 11:44 [PATCH] xfs: Don't keep silent if sunit/swidth can not be changed via mount Jeff Liu
2013-04-29 14:51 ` Mark Tinguely
2013-04-30  2:11   ` Jeff Liu
2013-04-30  7:36 ` Dave Chinner
2013-04-30  7:54   ` Jeff Liu
2013-04-30 11:35     ` Dave Chinner [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=20130430113514.GA10481@dastard \
    --to=david@fromorbit.com \
    --cc=jeff.liu@oracle.com \
    --cc=xfs@oss.sgi.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 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.