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


Groups > linux.kernel > #1384277 > unrolled thread

Re: [patch] direct-io: propagate -ENOSPC errors

Started byTodd Vierling <todd.vierling@oracle.com>
First post2016-04-21 16:20 +0200
Last post2016-04-21 16:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [patch] direct-io: propagate -ENOSPC errors Todd Vierling <todd.vierling@oracle.com> - 2016-04-21 16:20 +0200

#1384277 — Re: [patch] direct-io: propagate -ENOSPC errors

FromTodd Vierling <todd.vierling@oracle.com>
Date2016-04-21 16:20 +0200
SubjectRe: [patch] direct-io: propagate -ENOSPC errors
Message-ID<rqnCy-1Zd-39@gated-at.bofh.it>
On 03/21/2016 04:22 PM, Jeff Moyer wrote:
>> Just propagating some errors defintively seems odd.
> 
> Not really.  read, write, etc only expect a subset of errnos to be
> returned.  The goal was not to leak kernel-internal or unexpected error
> numbers to userspace, and I didn't think I would be able to successfully
> audit all code paths that lead here.  So, I opted for a more
> conservative patch that just allows one more errno through.

We have a use case which makes heavy use of dm to map plain files into
block devs. Propagating ENOSPC is useful here, as a sparse backing file
might run into this when extending, and the downstream app would be able
to see something other than EIO.

I'm ambivalent on whether or not to allow all errnos through, or just a
peephole like ENOSPC here. However, there's another errno which is
effectively the same cause as ENOSPC but triggered by a logical rather
than physical limit: EDQUOT.

If we're looking at a peephole for ENOSPC to be let through, I'd suggest
also allowing EDQUOT through. To your concerns about confusing
applications with too many possible errnos, EDQUOT could be translated
to ENOSPC before being let through to the block dev layer. (The net
effect is the same in any case, as the backing store has denied a write
due to some kind of space limit.)

-- 
-- Todd Vierling <tv@duh.org> <todd.vierling@oracle.com>

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web