cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/6] Ext4: fail if we try to use hole punch
Date: Tue, 16 Nov 2010 12:52:52 +0100	[thread overview]
Message-ID: <20101116115252.GD4757@quack.suse.cz> (raw)
In-Reply-To: <1289840723-3056-5-git-send-email-josef@redhat.com>

On Mon 15-11-10 12:05:21, Josef Bacik wrote:
> Ext4 doesn't have the ability to punch holes yet, so make sure we return
> EOPNOTSUPP if we try to use hole punching through fallocate.  This support can
> be added later.  Thanks,
> 
> Signed-off-by: Josef Bacik <josef@redhat.com>
  Acked-by: Jan Kara <jack@suse.cz>

								Honza
> ---
>  fs/ext4/extents.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 0554c48..35bca73 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3622,6 +3622,10 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len)
>  	struct ext4_map_blocks map;
>  	unsigned int credits, blkbits = inode->i_blkbits;
>  
> +	/* We only support the FALLOC_FL_KEEP_SIZE mode */
> +	if (mode && (mode != FALLOC_FL_KEEP_SIZE))
> +		return -EOPNOTSUPP;
> +
>  	/*
>  	 * currently supporting (pre)allocate mode for extent-based
>  	 * files _only_
> -- 
> 1.6.6.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR



  parent reply	other threads:[~2010-11-16 11:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1289840723-3056-1-git-send-email-josef@redhat.com>
     [not found] ` <1289840723-3056-2-git-send-email-josef@redhat.com>
2010-11-16 11:16   ` [Cluster-devel] [PATCH 1/6] fs: add hole punching to fallocate Jan Kara
2010-11-16 11:43     ` Jan Kara
     [not found]       ` <20101116125249.GB31957@dhcp231-156.rdu.redhat.com>
2010-11-16 13:14         ` Jan Kara
     [not found] ` <1289840723-3056-5-git-send-email-josef@redhat.com>
2010-11-16 11:52   ` Jan Kara [this message]
     [not found] ` <1289840723-3056-4-git-send-email-josef@redhat.com>
2010-11-16 11:50   ` [Cluster-devel] [PATCH 3/6] Ocfs2: handle hole punching via fallocate properly Jan Kara
2010-11-17 23:27   ` Joel Becker

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=20101116115252.GD4757@quack.suse.cz \
    --to=jack@suse.cz \
    /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).