Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1041723pxb; Thu, 17 Feb 2022 22:25:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfiIgzFLYT9wbsDomm3hC9xqAqnadJP/gqNQmmTIjSJ+8EJEwPjMH5eGDYo082Fm4ESvbb X-Received: by 2002:a63:1844:0:b0:36c:6a88:ad72 with SMTP id 4-20020a631844000000b0036c6a88ad72mr5032261pgy.329.1645165558008; Thu, 17 Feb 2022 22:25:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645165558; cv=none; d=google.com; s=arc-20160816; b=eC0W28UePfEqwNxtsI52/J0osAZUa4ptoPGYose1/Xms04s+kOOWujKfMyOdoReNel KxcF5CHREH+A4AxjpQ2EIw04m1CMfkvT/xcn8yxSDSRoMgLNTARQDsOd57BBpcz/W6iz C991d1rwzoCsQ+BepXouVcMQjdEP4eahnpnqEgVulC+mO0pPu5UxbUPpKwCz/jumuyZp NUgLnv2gFmbn4H6szfpFct/hJOb4rBnF3bg3Xrm9oY4FN+qjW5V3YftfY1seSPRclwUu MQWZcAQHvgtUXXBTJ4T8JFORXLPs95PcqvGtTwiCKI1R2oyY4XzhW6YEawtH3waFHiRu xTXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=T0HZDKS9JZ7gw/xbmFhccMhUPlGICeYoFd5pfYp5k94=; b=vl4pV2f0EemV9oLX1AIkkTCjO9m9NZrk3r5dgyhGpyir68BmPe3jTXZ8ekd/jmWhfz kkd/otLOsQjSm52qixdHQ56NQUfr0po2mnMVSEtz0Oh3jSFK29IFqmuTLz9nC7U+QSPz U3PfWqfSxD8GNaN8jOF+XzIgRtnRGkMFsHRaR4nGudnLjINbCdmMyBJABafPBk+Sjc9B 0LGInGb2Nl5dyBMnz97Wfo9yxhOfJfUJlGL5CDAnnTMKLb9COd6WAEWXbk7QSOc20W7i aDJc+hgb1nO8pBR6JRvM/rieqJpsQnDgmYW5S+SwmrloABgwP/rWaPF2kTjUyuM/uzwx xKZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7si11619721plf.397.2022.02.17.22.25.44; Thu, 17 Feb 2022 22:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbiBRGRI (ORCPT + 99 others); Fri, 18 Feb 2022 01:17:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbiBRGRH (ORCPT ); Fri, 18 Feb 2022 01:17:07 -0500 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFFBF237FE; Thu, 17 Feb 2022 22:16:49 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0V4ngyTv_1645165006; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0V4ngyTv_1645165006) by smtp.aliyun-inc.com(127.0.0.1); Fri, 18 Feb 2022 14:16:47 +0800 From: Xianting Tian To: bcrl@kvack.org, viro@zeniv.linux.org.uk Cc: linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Xianting Tian Subject: [PATCH] aio: make io return value more readable Date: Fri, 18 Feb 2022 14:16:40 +0800 Message-Id: <20220218061640.444038-1-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We may need to enable the debug prints in aio_complete when met io error issue. We got below prints, fffffffffffffffb means the io err is EIO(-5), but it's not readable. [ 33.304182] aio_complete: 00000000b3c70ea0[17]: 00000000cd131d11: 0000000023803e77 3fc2b160f0 fffffffffffffffb 0 Below prints are more readable, the value(-5) matches the errno defined in include/uapi/asm-generic/errno-base.h, [ 98.187270] aio_complete: 00000000220ae523[10]: 00000000045ed171: 000000004c334ae4 3fc211a330 -5 0 Signed-off-by: Xianting Tian --- fs/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/aio.c b/fs/aio.c index 4ceba13a7..45a9ff3d2 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1140,7 +1140,7 @@ static void aio_complete(struct aio_kiocb *iocb) kunmap_atomic(ev_page); flush_dcache_page(ctx->ring_pages[pos / AIO_EVENTS_PER_PAGE]); - pr_debug("%p[%u]: %p: %p %Lx %Lx %Lx\n", ctx, tail, iocb, + pr_debug("%p[%u]: %p: %p %Lx %Ld %Ld\n", ctx, tail, iocb, (void __user *)(unsigned long)iocb->ki_res.obj, iocb->ki_res.data, iocb->ki_res.res, iocb->ki_res.res2); -- 2.17.1