From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([65.50.211.133]:47300 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbdIXIcD (ORCPT ); Sun, 24 Sep 2017 04:32:03 -0400 Date: Sun, 24 Sep 2017 01:32:03 -0700 From: Matthew Wilcox To: Goldwyn Rodrigues Cc: linux-fsdevel@vger.kernel.org, Goldwyn Rodrigues Subject: Re: [PATCH] Return bytes transfered for partial direct I/O Message-ID: <20170924083203.GA15727@bombadil.infradead.org> References: <20170923231014.12477-1-rgoldwyn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170923231014.12477-1-rgoldwyn@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Sep 23, 2017 at 06:10:14PM -0500, Goldwyn Rodrigues wrote: > In case direct I/O encounters an error midway, it returns the error. > Instead it should be returning the number of bytes transferred so far. > > Test case (with ENOSPC): > 1. Create an almost full filesystem > 2. Create a file, say /mnt/lastfile, until the filesystem is full. > 3. Direct write() with count > sizeof /mnt/lastfile. > > Result: write() returns -ENOSPC. However, file content has data written > in step 3. Can you add an xfstest to be sure we don't regress this in the future?