Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp468943imm; Wed, 11 Jul 2018 05:49:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdK9hEYsSxeoK2ltlgumxZWWK0dRnvJ6TqzcGgwSN5WMmSr/HTJhQIDbbmr72vRkk6rrSX7 X-Received: by 2002:a62:20d8:: with SMTP id m85-v6mr23110364pfj.74.1531313380199; Wed, 11 Jul 2018 05:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531313380; cv=none; d=google.com; s=arc-20160816; b=B0MdFjaYVPAk2V2xTn9yfbj9/statB8mMt/tHmkfXVHPye0Qq9SBEG+bMYkXV3Jcwu uey2z95vTRlkqdpFhBu5+CfSLdN2XNM3quHKo6vGqmR/TzTulp+nzLnpf5TJU9v3T4Ii Ds6FnOaGs8oSi9sBwN3vMoa7TVH8vdJyTR8tJPCrXnm/ChSkZp8ys2iW157Cm8rBJrVP JarNNfbVOFmwG7UOATRyvJxk4kaubOJX/6sj8ExBgHfBvosNRNk4RQoKWV+7CBdQk6t5 QIG2MiTI3gC3ec9qftA2gluC+vYNF/gL4f7YRzbRrwjYofCw84YzxhaF0vfhyOklNn/c FTBw== 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=9eF57SmJisC98t+66HCyaHRLc6OqRz/SJNotiesc+B0=; b=jCsrx9HPRpfAkm1PDhiZZETMG+NCyIoWUQB6J7DpoRNaRQ8V2XDPoTBLeXVDLSRf3C gPfSQvMAbV+RahMOQrFZ/ABdrw6TH8NLsw7wgWMI30T7bQNeJYi2IVklgFKaqPpPskXG IKonuYyW9OI6Bsf3a/VSTImm0IuF7cBLsoZWQsfNBRt7+q+V8FDr2+dAJeFm3uFaV6v4 1PeIlafMVpEHZHAOhY0Yiq6lz1lQjAdn9+DOOHYM73CPnKdsCSATB3/FQRPQycy6MAbN 0QZIFxIZLXVHGJWazNC/Gqh4sjCwqas5xwgQbV47G+1NF1FJ6l3LXiMlIjcbwLwaQ0uH z2Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=Jw+YqYOu; 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 x6-v6si18656733pgk.597.2018.07.11.05.49.24; Wed, 11 Jul 2018 05:49: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=Jw+YqYOu; 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 S2387465AbeGKMgG (ORCPT + 99 others); Wed, 11 Jul 2018 08:36:06 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33483 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732870AbeGKMgG (ORCPT ); Wed, 11 Jul 2018 08:36:06 -0400 Received: by mail-yw0-f193.google.com with SMTP id c135-v6so9063390ywa.0 for ; Wed, 11 Jul 2018 05:31:59 -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=9eF57SmJisC98t+66HCyaHRLc6OqRz/SJNotiesc+B0=; b=Jw+YqYOuQxbKdxlNf7cDjhTZQLlFZjkkNajJvSX7ioN9zvSrNwPGrNm5x5pOzgdEhl iFt/SclpkwjmK8StvpDdyacDTJteGZrsOR0zxKCR0dwgeve6fcDVHkaktaISFmzkvnQu 1CW1VSMrr5DTrzknyCczW3q3ohGJyJs8xzIhjmpSxWvnpD5hJUO311EiVRUf5YbpAtyZ 4VPjgctQ92pxuydzNcDATnixRe5LRr4xRpofCuL0K3owN7+QY7DYSpP5Fd+Q13EuvkUz /b5w/yUOo/z96bUzcxoHvWO0KoloqDhg9ArakvyXrkr2houfsqkii+q9T+XQ/Rtw5MyQ JsUQ== 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=9eF57SmJisC98t+66HCyaHRLc6OqRz/SJNotiesc+B0=; b=CzB+XyTwQkVFNpZQoXgUR8VweEaxCWPISsQ1DpPnG5hNpNJthqtwRoHP3/Er4W0+ly 2Xnkufgs0KsaVvXtfWaMmDkvFWm1w555XiYfB60ga+BqTC4yKfG80W/n8U8x03pnXL2K TeMqjj2f64eIEdl+bw4GzA0YuUTQirfGY4xSLwj8BCp2pLz4bePW8fK50SeHe2i2ZwWh qTMJakeBE0gPPve0nTe9BERDLv+mMfwxjN1PuKZvjBq5Qu+1QdyLhh/AWjTnKX7+4NvL 0tZIS5GN0iHwUMCOa7863HZoNWFZdT6pJcVnpGeqT3G0OPjb+7TUmOMGUtifIuFOuBcI Hhmg== X-Gm-Message-State: APt69E3KLugoOeIDCO/JwlqY41lSi9zYj9h9/478/dDcmbpGVNTViNM6 /bm2cHB+1q7GROu7H6q/2c863CJYFo3kqhtVB3qz+A== X-Received: by 2002:a81:8a42:: with SMTP id a63-v6mr14566680ywg.433.1531312318632; Wed, 11 Jul 2018 05:31:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:86c6:0:0:0:0:0 with HTTP; Wed, 11 Jul 2018 05:31:57 -0700 (PDT) In-Reply-To: References: <20180628184240.GA17183@jordon-HP-15-Notebook-PC> From: Mike Marshall Date: Wed, 11 Jul 2018 08:31:57 -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 Yes, I'd be happy to send it in at the 4.19 merge window... -Mike On Wed, Jul 11, 2018 at 1:56 AM, Souptick Joarder wrote: > On Wed, Jul 11, 2018 at 1:13 AM, Mike Marshall wrote: >> Hi... >> >> I applied this patch to 4.18.0-rc4. It applied cleanly and there's no xfstests >> regressions. Sorry if I held you up any... >> >> You can add: Tested-By: Mike Marshall >> > > Thanks Mike. Can we get this patch in queue for 4.19 merge window ? > >> -Mike >> >> On Fri, Jul 6, 2018 at 10:05 AM, Mike Marshall wrote: >>> 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 ?