mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Todd Vierling <todd.vierling@oracle.com>
To: Jeff Moyer <jmoyer@redhat.com>, Christoph Hellwig <hch@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] direct-io: propagate -ENOSPC errors
Date: Thu, 21 Apr 2016 10:17:50 -0400	[thread overview]
Message-ID: <07bce0cc-efe2-9a73-09a4-3c041bf6067f@oracle.com> (raw)
In-Reply-To: <x491t7360p3.fsf@segfault.boston.devel.redhat.com>

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>

      reply	other threads:[~2016-04-21 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 21:10 Jeff Moyer
2016-03-16 13:25 ` Carlos Maiolino
2016-03-21 16:02 ` Christoph Hellwig
2016-03-21 20:22   ` Jeff Moyer
2016-04-21 14:17     ` Todd Vierling [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=07bce0cc-efe2-9a73-09a4-3c041bf6067f@oracle.com \
    --to=todd.vierling@oracle.com \
    --cc=hch@infradead.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®