From patchwork Sat Oct 29 08:08:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F01960588 for ; Sat, 29 Oct 2016 08:14:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DADE2A597 for ; Sat, 29 Oct 2016 08:14:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 225AD2A5EC; Sat, 29 Oct 2016 08:14:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8AE02A5ED for ; Sat, 29 Oct 2016 08:14:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942679AbcJ2IOD (ORCPT ); Sat, 29 Oct 2016 04:14:03 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35773 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941619AbcJ2INX (ORCPT ); Sat, 29 Oct 2016 04:13:23 -0400 Received: by mail-pf0-f195.google.com with SMTP id s8so3379275pfj.2; Sat, 29 Oct 2016 01:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z83xtxmL4a9wvpTBvYHrIhP2nTAcIG86eBKcgAqZGA4=; b=jp1TXLCgzsRZJAEpRhs4gkXVCdKMMn2s+IepAu1EmIkJkn3bn1en/mLWnGAYrywnMX 9iOm/iBAUlSDyfWevdxQQlzeMNNt0QPoD97adAz1WYDZUSGdTHLiavNAYz9c1lL7yi+P LOMnBfdKkbkAYiw7Viy9852hxdqACQB5fbDHh1HS0cQuXNB4NtV5nvlHUsJSNCt7eDGn xqAgyS80j0iUmrkGpdcGkrTO+zePWHrjwH4ycF/j+ECVXbxEEn5OzXavjK00dXoUqj+Z lYesv9hJjUFZfGshlYzRtJLVoQ0xWopjFzdPlGuSIgC6lt1x7+BCkpWuz+gdJEmOqp6O /SJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z83xtxmL4a9wvpTBvYHrIhP2nTAcIG86eBKcgAqZGA4=; b=RDoqpNrK8TiKQpPdzijg/BS2lt3G18YlmmaZAbQJ8pD2t0fKlIQH2AzvWzXWPRcncH vWKIds/XoDBosptoxXu5W3UzzCM+axKWqM60cGjtpMxysV7oxE7a4u88/Hcb0P4OzwgZ j1+zEGCKrtWD776b7DE8JyqX5axncy0CC3flYKVXFpMy9dfAfX1GzYW5fH+UIHYqc3Hd ekfKp68ojmxhqQzS6rfiUrKoSvdxRgeu5+hy8MVGI5YC0ilkBHg3sEbm4Ws8c51Pnw3s iORWeqN4EoG1ybH5rZscIvv1CqJl6cPC6XncXLX+XjSYy6DITWzZjFXvg4iazr10bHTW 1yWQ== X-Gm-Message-State: ABUngvdVAdjKz1FtUnJGQ29rEM0eeCcf71lXH5pQyBmHacSRGEFXX5cbVgpGGc4SdCFVPg== X-Received: by 10.99.169.25 with SMTP id u25mr25980502pge.6.1477728802646; Sat, 29 Oct 2016 01:13:22 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id xv9sm23547541pab.36.2016.10.29.01.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:13:22 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net (open list:F2FS FILE SYSTEM) Subject: [PATCH 20/60] f2fs: f2fs_read_end_io: comment on direct access to bvec table Date: Sat, 29 Oct 2016 16:08:19 +0800 Message-Id: <1477728600-12938-21-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- fs/f2fs/data.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 9ae194fd2fdb..24f6f6977d37 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -35,6 +35,10 @@ static void f2fs_read_end_io(struct bio *bio) int i; #ifdef CONFIG_F2FS_FAULT_INJECTION + /* + * It is still safe to retrieve the 1st page of the bio + * in this way after supporting multipage bvec. + */ if (time_to_inject(F2FS_P_SB(bio->bi_io_vec->bv_page), FAULT_IO)) bio->bi_error = -EIO; #endif