Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1821040imm; Fri, 6 Jul 2018 07:07:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+vHdWSLlpXHdD7fooD3Z7sC3gufXJvTG5MMy43kh5PFhyU6qVWcxPGPZLW+qRF7hwpr1d X-Received: by 2002:a63:5922:: with SMTP id n34-v6mr9637643pgb.113.1530886060118; Fri, 06 Jul 2018 07:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530886060; cv=none; d=google.com; s=arc-20160816; b=Rsh85oQ4G7XkIK4Wrt8Gw/UyocNeVUmPdFRLWe/KjomRvrCInYpjelpVE6BAnAO2Xz idyqNOWYteo/GbCByKsXLcGcInBBqXIa0Md7sTIlcaJjSSSgAFJ9gz8P/ECi4m34qNy5 XRSerfx+Dn+mMks2wIdU3g8vJquiMTdM/O2+hLmKbXHkH06rl4XCxbmcBHOkOaklrTaz gX5t/Hquu7BLF8DJZRqejU+e4e8bOQjLC1B7KkzyifSJvTjHgJIbMa5gwvqDeXo7an9P qE3s+I4OjtEuyhY7hbgo97z/rHv7jF8MJ+mQcqvhAsgGyNDSbFt91zYdDdk4ZdELgUiW zAcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=+4Dg5pQy0fw+GXCWJBkYactAsCXuNlVRMswY6wqQ8wo=; b=N7AI+YnDo1pWDx8bqnERapf7re3qERmWnBytq2beem4stZZm0jNJeJvgVRVjR9IY+g 88+d97q6BDeMjFl15i1JUNIWmTFuQNicdrQFtkWkRyvxPHKr4+RKgozP4VmscDWYcVBD KXPibBZqkHjHZLLkGNNRZaWDPI+8+ivmxG6r2bycqnbJhjDJzEVyyXKVZVb6W5/BOZi9 6ty2tIQ+kuHhzCzfUHzJQRxWUatyfPEAbzlcqIz7P2Hc5JDtcO03R81fXaXXwtLDGjJx RPDd6aGAYXpgJrLCSDw1AD8xmZJTUJ5SJisQN7LhCLV5Oguem278MyRmOx22q+UYEcR4 zgrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=LoGBOxeC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i184-v6si7874633pge.405.2018.07.06.07.07.16; Fri, 06 Jul 2018 07:07:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=LoGBOxeC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932542AbeGFOFR (ORCPT + 99 others); Fri, 6 Jul 2018 10:05:17 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:42869 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932374AbeGFOFP (ORCPT ); Fri, 6 Jul 2018 10:05:15 -0400 Received: by mail-yb0-f196.google.com with SMTP id c10-v6so2858115ybf.9 for ; Fri, 06 Jul 2018 07:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+4Dg5pQy0fw+GXCWJBkYactAsCXuNlVRMswY6wqQ8wo=; b=LoGBOxeCU0P2iLpq6rgHESiz+61g6t6oLF2uCoy78GyuaiQu3AF0icA/a9eDz5PrZn D2ZxuS4asqy4eIX0uPO/Si3H44K5yvM992EGu7OUznOrsw6Z3clURXt40PWqdaPfwdd2 mesAtmUck0IwbV6dkT0oDeuzpdZhSiuCaU5nzs1Lx0bVGXNGToWkReuF6g86a/rnL1e/ 9DcOyT/scstMSCMeVwqYaXy6AMEeD+dbdTgs++sK0K4tX/7XQ1Pvtsae+nG82eZblQ+y ivTG6itD9hqCpA8+cKVKvIDKgXdqp9arLGfywhZvy3is6HAkEPmuBaUXMcetXH9121v3 7MgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+4Dg5pQy0fw+GXCWJBkYactAsCXuNlVRMswY6wqQ8wo=; b=LpGj0cfX4HURZ67RYQL1umcjfok9xYQdEsFmJUQ9JuEzj5JZtX1Zd9a4OTOmTAIArC Jd7UIV5tkPRjjVjeF7R+IiG5vtOr7NLTU7i5jcrDIVZZIJf3l4q4qCgJljfrEDE7Ygsv OmhCVaD83n0fh4j+HrjaBxYJ6OEa7jb+l0p6sSxHLQtdAEuyIzMxGXQw+XP8qUqTI854 1t/2eozcXQJhqgf3CtQu9x7sy0u+iHCmOMEyH3oTpNIY7VE5/xeuvxzSoZQeFWEWnY2W 534AkPQTignwAN3oC5y7MFVU/31KgEEpl+3+WJjR9XMqi/70sZSer5M3Nq70Le6fQIlz 9DNg== X-Gm-Message-State: APt69E2lE87rwMPNYWuk3lrryo4GsutYJ3Fv7qc9AtezbeM85sr679jS TeSJqPQuLvJpDrsVNc4op1IN6vp+FyGrvMtnIlylEA== X-Received: by 2002:a25:ba4b:: with SMTP id z11-v6mr5426327ybj.427.1530885915273; Fri, 06 Jul 2018 07:05:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:86c6:0:0:0:0:0 with HTTP; Fri, 6 Jul 2018 07:05:14 -0700 (PDT) In-Reply-To: References: <20180628184240.GA17183@jordon-HP-15-Notebook-PC> From: Mike Marshall Date: Fri, 6 Jul 2018 10:05:14 -0400 Message-ID: Subject: Re: [PATCH] orangefs: Adding new return type vm_fault_t To: Souptick Joarder Cc: Matthew Wilcox , Martin Brandenburg , devel@lists.orangefs.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Souptick Joarder: Any comment for this patch? Thanks for sending it ... I have it in my stack, but I haven't studied it, or xfstested it yet, so no useful comments yet... -Mike On Fri, Jul 6, 2018 at 2:44 AM, Souptick Joarder wrote: > On Fri, Jun 29, 2018 at 12:12 AM, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler. For now, >> this is just documenting that the function returns a VM_FAULT >> value rather than an errno. Once all instances are converted, >> vm_fault_t will become a distinct type. >> >> See the following >> commit 1c8f422059ae ("mm: change return type to vm_fault_t") >> >> Fixed checkpatch.pl warning. >> >> Signed-off-by: Souptick Joarder >> --- >> fs/orangefs/file.c | 19 ++++++++++--------- >> 1 file changed, 10 insertions(+), 9 deletions(-) >> >> diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c >> index db0b521..a5a2fe7 100644 >> --- a/fs/orangefs/file.c >> +++ b/fs/orangefs/file.c >> @@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar >> return ret; >> } >> >> -static int orangefs_fault(struct vm_fault *vmf) >> +static vm_fault_t orangefs_fault(struct vm_fault *vmf) >> { >> struct file *file = vmf->vma->vm_file; >> - int rc; >> - rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1, >> + int ret; >> + >> + ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1, >> STATX_SIZE); >> - if (rc == -ESTALE) >> - rc = -EIO; >> - if (rc) { >> - gossip_err("%s: orangefs_inode_getattr failed, " >> - "rc:%d:.\n", __func__, rc); >> - return rc; >> + if (ret == -ESTALE) >> + ret = -EIO; >> + if (ret) { >> + gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n", >> + __func__, ret); >> + return VM_FAULT_SIGBUS; >> } >> return filemap_fault(vmf); >> } >> -- >> 1.9.1 >> > > Any comment for this patch ?