linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] iomap: don't allow holes in swapfiles
Date: Wed, 16 May 2018 09:26:14 -0700	[thread overview]
Message-ID: <20180516162614.GB14174@vader> (raw)
In-Reply-To: <20180516162329.GA21071@infradead.org>

On Wed, May 16, 2018 at 09:23:29AM -0700, Christoph Hellwig wrote:
> >  
> > -	/* Skip holes. */
> > +	/* No holes. */
> >  	if (iomap->type == IOMAP_HOLE)
> > -		goto out;
> > +		goto err;
> 
> If we end up not allowing holes this check can just be removed
> entirely.  We already check for the allow types below.  I have to
> admit I would move that type check above the bdev check, though.

True, although I wonder if we should be logging more specific error
messages instead of a generic "not a valid swap file" message. At least
for my Btrfs patches, that's what I do. I'll send a v2 with a second
patch doing that.

      reply	other threads:[~2018-05-16 16:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  6:45 Omar Sandoval
2018-05-16 15:50 ` Darrick J. Wong
2018-05-16 15:51   ` Christoph Hellwig
2018-05-16 15:56     ` Darrick J. Wong
2018-05-16 16:19       ` Omar Sandoval
2018-05-16 16:24         ` Christoph Hellwig
2018-05-16 16:23 ` Christoph Hellwig
2018-05-16 16:26   ` Omar Sandoval [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=20180516162614.GB14174@vader \
    --to=osandov@osandov.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --subject='Re: [PATCH] iomap: don'\''t allow holes in swapfiles' \
    /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

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).