Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756944AbcCUQCM (ORCPT ); Mon, 21 Mar 2016 12:02:12 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:54980 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756522AbcCUQCK (ORCPT ); Mon, 21 Mar 2016 12:02:10 -0400 Date: Mon, 21 Mar 2016 09:02:08 -0700 From: Christoph Hellwig To: Jeff Moyer Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch] direct-io: propagate -ENOSPC errors Message-ID: <20160321160208.GA15481@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 558 Lines: 10 On Mon, Mar 14, 2016 at 05:10:00PM -0400, Jeff Moyer wrote: > dio_bio_complete turns all errors into -EIO. This is historical, > since you used to only get 1 bit precision for errors (BIO_UPTODATE). > Now that we get actual error codes, we can return the appropriate > code to userspace. File systems seem to only propagate either EIO > or ENOSPC, so I've followed suit in this patch. Do we? Just propagating some errors defintively seems odd. Even if we do we should have a central helper doing that mapping instead of opencoding it in various places.