linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: disable xfs_ioc_space for always COW inodes
Date: Thu, 24 Oct 2019 22:45:26 -0700	[thread overview]
Message-ID: <20191025054526.GG913374@magnolia> (raw)
In-Reply-To: <20191025023609.22295-4-hch@lst.de>

On Fri, Oct 25, 2019 at 11:36:08AM +0900, Christoph Hellwig wrote:
> If we always have to write out of place preallocating blocks is
> pointless.  We already check for this in the normal falloc path, but
> the check was missig in the legacy ALLOCSP path.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/xfs_ioctl.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 3fe1543f9f02..552034325991 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -33,6 +33,7 @@
>  #include "xfs_sb.h"
>  #include "xfs_ag.h"
>  #include "xfs_health.h"
> +#include "xfs_reflink.h"
>  
>  #include <linux/mount.h>
>  #include <linux/namei.h>
> @@ -606,6 +607,9 @@ xfs_ioc_space(
>  	if (!S_ISREG(inode->i_mode))
>  		return -EINVAL;
>  
> +	if (xfs_is_always_cow_inode(ip))
> +		return -EOPNOTSUPP;
> +
>  	if (filp->f_flags & O_DSYNC)
>  		flags |= XFS_PREALLOC_SYNC;
>  	if (filp->f_mode & FMODE_NOCMTIME)
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-10-25  5:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  2:36 clean up xfs space management interfaces Christoph Hellwig
2019-10-25  2:36 ` [PATCH 1/4] xfs: don't implement XFS_IOC_RESVSP / XFS_IOC_RESVSP64 directly Christoph Hellwig
2019-10-25  5:32   ` Darrick J. Wong
2019-10-25  2:36 ` [PATCH 2/4] fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers Christoph Hellwig
2019-10-25  5:44   ` Darrick J. Wong
2019-10-25  9:50     ` Christoph Hellwig
2019-10-26 20:56       ` Dave Chinner
2019-10-27 15:19         ` Christoph Hellwig
2019-10-25  2:36 ` [PATCH 3/4] xfs: disable xfs_ioc_space for always COW inodes Christoph Hellwig
2019-10-25  5:45   ` Darrick J. Wong [this message]
2019-10-25  2:36 ` [PATCH 4/4] xfs: consolidate preallocation in xfs_file_fallocate Christoph Hellwig
2019-10-25  5:48   ` Darrick J. Wong

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=20191025054526.GG913374@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).