Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1350973

Re: [PATCH 3/3] block: implement (some of) fallocate for block devices

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] block: implement (some of) fallocate for block devices
Date 2016-03-05 22:00 +0100
Message-ID <r9rsR-3cU-5@gated-at.bofh.it> (permalink)
References <r98Jz-6FF-3@gated-at.bofh.it> <r98Jz-6FF-1@gated-at.bofh.it> <r9aV4-8th-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Mar 04, 2016 at 07:13:25PM -0800, Linus Torvalds wrote:
> > +       /* We can't change the bdev size from here */
> > +       if (!(mode & FALLOC_FL_KEEP_SIZE))
> > +               return -EOPNOTSUPP;
> 
> Oh, and this I think is wrong.
> 
> The thing is, FALLOC_FL_KEEP_SIZE is only supposed to matter if the
> region is outside the existing length.

For allocations...

> So if y ou punch a hole in the middle of a file, you don't need
> FALLOC_FL_KEEP_SIZE.

For FALLOC_FL_PUNCH_HOLE we always require FALLOC_FL_KEEP_SIZE so far,
and I'd rather not change things for block devices just because we can.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/3] fallocate for block devices to provide zero-out "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-03-05 02:00 +0100
  [PATCH 3/3] block: implement (some of) fallocate for block devices "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-03-05 02:00 +0100
    Re: [PATCH 3/3] block: implement (some of) fallocate for block devices Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-05 04:10 +0100
      Re: [PATCH 3/3] block: implement (some of) fallocate for block  devices Christoph Hellwig <hch@infradead.org> - 2016-03-05 22:00 +0100
    Re: [PATCH 3/3] block: implement (some of) fallocate for block devices Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-05 04:20 +0100
      Re: [PATCH 3/3] block: implement (some of) fallocate for block  devices Christoph Hellwig <hch@infradead.org> - 2016-03-05 22:00 +0100
  [PATCH 1/3] block: invalidate the page cache when issuing  BLKZEROOUT. "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-03-05 02:00 +0100
    Re: [PATCH 1/3] block: invalidate the page cache when issuing  BLKZEROOUT. Christoph Hellwig <hch@infradead.org> - 2016-03-15 08:40 +0100
  [PATCH 2/3] block: require write_same and discard requests align to  logical block size "Darrick J. Wong" <darrick.wong@oracle.com> - 2016-03-05 02:00 +0100
    Re: [PATCH 2/3] block: require write_same and discard requests align  to logical block size Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-05 04:10 +0100
    Re: [PATCH 2/3] block: require write_same and discard requests align  to logical block size Christoph Hellwig <hch@infradead.org> - 2016-03-15 08:40 +0100
  Re: [PATCH v6 0/3] fallocate for block devices to provide zero-out Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-05 04:20 +0100

csiph-web