Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751078AbdGZSpf (ORCPT ); Wed, 26 Jul 2017 14:45:35 -0400 Received: from mx0a-00190b01.pphosted.com ([67.231.149.131]:36976 "EHLO mx0a-00190b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbdGZSpd (ORCPT ); Wed, 26 Jul 2017 14:45:33 -0400 From: Jason Baron To: rgoldwyn@suse.com Cc: jack@suse.cz, axboe@kernel.dk, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: nowait aio return value Message-ID: <04be5a78-3428-c09e-bc63-5061fa568ea5@akamai.com> Date: Wed, 26 Jul 2017 14:45:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707260271 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=1 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=1 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707260271 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 614 Lines: 20 Hi, In testing nowait aio on ext4, I found that when appending to a file the return value is EAGAIN/EWOULDBLOCK, because as mentioned in the commit this will potentially trigger an allocation. However, the EAGAIN, seems somewhat misleading to me, in that if I continuously try the write, it will never succeed. The relevant commit is: 728fbc0 ext4: nowait aio support As you can see there, failure to get the inode lock is treated as EAGAIN, which seems more appropriate to me, as its very likely to succeed on subsequent calls. Perhaps, it could be switched to -EINVAL, or something else? Thanks, -Jason