All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
Cc: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	Matthew Rahtz
	<mrahtz-lFL+a/sBLVi/3pe1ocb+swC/G2K4zDHf@public.gmane.org>,
	linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: warning in ext4_journal_start_sb on filesystem freeze
Date: Mon, 10 Mar 2014 06:34:51 -0700	[thread overview]
Message-ID: <20140310133451.GA17807@infradead.org> (raw)
In-Reply-To: <20140304190442.GE12805-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>

On Tue, Mar 04, 2014 at 02:04:42PM -0500, J. Bruce Fields wrote:
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 6d7be3f..eea5ad1 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -404,6 +404,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
>  	umode_t		ftype = 0;
>  	__be32		err;
>  	int		host_err;
> +	bool		get_write_count;
>  	int		size_change = 0;
>  
>  	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE))
> @@ -411,10 +412,18 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
>  	if (iap->ia_valid & ATTR_SIZE)
>  		ftype = S_IFREG;
>  
> +	/* Callers that do fh_verify should do the fh_want_write: */
> +	get_write_count = !fhp->fh_dentry;

Eww, this is nasty.  Given that there are only 6 callers of nfsd_setattr
in total, and only half of these might cause size changes I'd rather
deal with this properly, e.g. by taking both the fh_verify into the
callers.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Jan Kara <jack@suse.cz>, Matthew Rahtz <mrahtz@rapitasystems.com>,
	linux-ext4@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: warning in ext4_journal_start_sb on filesystem freeze
Date: Mon, 10 Mar 2014 06:34:51 -0700	[thread overview]
Message-ID: <20140310133451.GA17807@infradead.org> (raw)
In-Reply-To: <20140304190442.GE12805@fieldses.org>

On Tue, Mar 04, 2014 at 02:04:42PM -0500, J. Bruce Fields wrote:
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 6d7be3f..eea5ad1 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -404,6 +404,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
>  	umode_t		ftype = 0;
>  	__be32		err;
>  	int		host_err;
> +	bool		get_write_count;
>  	int		size_change = 0;
>  
>  	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE))
> @@ -411,10 +412,18 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
>  	if (iap->ia_valid & ATTR_SIZE)
>  		ftype = S_IFREG;
>  
> +	/* Callers that do fh_verify should do the fh_want_write: */
> +	get_write_count = !fhp->fh_dentry;

Eww, this is nasty.  Given that there are only 6 callers of nfsd_setattr
in total, and only half of these might cause size changes I'd rather
deal with this properly, e.g. by taking both the fh_verify into the
callers.


  parent reply	other threads:[~2014-03-10 13:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <217983071.143460.1385453196946.JavaMail.zimbra@rapitasystems.com>
2013-11-26  8:20 ` warning in ext4_journal_start_sb on filesystem freeze Matthew Rahtz
2013-11-26 12:58   ` Jan Kara
2014-02-22  9:50     ` Matthew Rahtz
     [not found]       ` <622177618.727.1393062606061.JavaMail.zimbra-lFL+a/sBLVi/3pe1ocb+swC/G2K4zDHf@public.gmane.org>
2014-02-24  9:55         ` Jan Kara
2014-02-24  9:55           ` Jan Kara
     [not found]           ` <20140224095525.GA20532-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2014-02-24 15:45             ` J. Bruce Fields
2014-02-24 15:45               ` J. Bruce Fields
     [not found]               ` <20140224154532.GB11992-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2014-02-25 10:21                 ` Jan Kara
2014-02-25 10:21                   ` Jan Kara
     [not found]                   ` <20140225102126.GB1669-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2014-03-04 16:43                     ` J. Bruce Fields
2014-03-04 16:43                       ` J. Bruce Fields
     [not found]                       ` <20140304164306.GC12805-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2014-03-04 19:04                         ` J. Bruce Fields
2014-03-04 19:04                           ` J. Bruce Fields
2014-03-08  9:02                           ` Matthew Rahtz
2014-03-08  9:02                             ` Matthew Rahtz
2014-03-10 13:26                             ` J. Bruce Fields
2014-03-10 13:26                               ` J. Bruce Fields
     [not found]                           ` <20140304190442.GE12805-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2014-03-10 13:34                             ` Christoph Hellwig [this message]
2014-03-10 13:34                               ` Christoph Hellwig
     [not found]                               ` <20140310133451.GA17807-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-03-10 19:57                                 ` J. Bruce Fields
2014-03-10 19:57                                   ` J. Bruce Fields
     [not found]                                   ` <20140310195709.GH28006-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2014-03-10 23:40                                     ` Christoph Hellwig
2014-03-10 23:40                                       ` Christoph Hellwig
2014-04-01 18:40                                   ` J. Bruce Fields

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=20140310133451.GA17807@infradead.org \
    --to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mrahtz-lFL+a/sBLVi/3pe1ocb+swC/G2K4zDHf@public.gmane.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.