Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3542468ybz; Mon, 20 Apr 2020 05:01:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7FySEX/PXQa47i2CX46B1B7dmVVMHumRNILPi+X/y82BE7jYKHD3nZAjuxi5sjgcFuW6P X-Received: by 2002:a17:906:13d1:: with SMTP id g17mr16162126ejc.162.1587384072070; Mon, 20 Apr 2020 05:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384072; cv=none; d=google.com; s=arc-20160816; b=DQVJf0B6NdGxJUufcmWKaYWS/Dns428FHN/EspLdtYZYR0iVmIkB5BQSIZa6HDCBID N3xqUpTG/uiXiOCGS6tReytjK9dzVVXRKZzk6YUpQgPhoKs+YWk7o0q927m7yYdPkxq8 KbTwOZP4iTkr2AaEo88wghDp/EVIEYbLNWEYf/ECNE5v0eZ9BMqX/MUqWBFF8j0lI/Uz GIG4CZoWBm7ttQEuhCEVsy0XzeY85pj3Yz0a693ZyASFKamOcidISsxEkDUqZ2ctr/Aw XuZt+ilsXf6Ip2zaBRq6o4a/v93OxMMHaplQpmu1VQGFa5GtOexkXgGquOh9xViug6MR 0BpQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=+y1lT01n5LFQXR5L/0fi5pH+uoGk38PvjIvfNQPImu8=; b=0BiXCDkLxa8tATJpU5zFSEYqJRPkXB2iAKLwANqtScjp+IOQZG8fkVJAZuoEf5xDgr rVXrxB4eebmE47NX0kDqM7acueTWy4dCdJp4IUVBbIXeOW5RnqYPWFDUdspEBZP0EgSm QR2gZ1q+9cC4QddaEEGF9IcLCbQbCgeiA4JmDMoKfx6nbKBva0wIxIClY8+s0YJpbmu5 tyRDoxVmLIz5Q9ZjCKH7xkVZmdq4WuCCYL9m3Oew5P1D69J09CJ7nRS6DeQOfqPCA6zs 12yX+om0ftImFA305PphQ/tF+vgADlyHVjlcYbxvgzOR1WZLWCrKzMhKPsk2id5RH3Pt WY1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AsmHoVm6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si413051ejr.440.2020.04.20.05.00.47; Mon, 20 Apr 2020 05:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AsmHoVm6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbgDTL6M (ORCPT + 99 others); Mon, 20 Apr 2020 07:58:12 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:24617 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726606AbgDTL6L (ORCPT ); Mon, 20 Apr 2020 07:58:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587383889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+y1lT01n5LFQXR5L/0fi5pH+uoGk38PvjIvfNQPImu8=; b=AsmHoVm6Obwcwxvd2ZZ7GO16QZrqUneaxvnGQUH7EaJ0iWL8iVXZy5riZZsWaGAxcTVEVC X59itjdfDZvcVqEgRz4mp+sGw+bsdrEKXKxmKPtYa434SupJJYckhOrHqNMwIG7Jwd/itu 46qWSiPB5nzWrDGVtQ42Lc39oEbpqmc= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-z081lBAgMHC4hLrmdYhSBA-1; Mon, 20 Apr 2020 07:58:08 -0400 X-MC-Unique: z081lBAgMHC4hLrmdYhSBA-1 Received: by mail-lf1-f71.google.com with SMTP id b16so4128101lfb.19 for ; Mon, 20 Apr 2020 04:58:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+y1lT01n5LFQXR5L/0fi5pH+uoGk38PvjIvfNQPImu8=; b=Xads+AFPCtyzgtCK5lbU6q2SP/yXw28yEkJ3On3cPHG1G3rIaoArkhy7s1klpUqLTx z9Vrb+ZpBGExmr6YrJkVjFhzmgxjmRLwgUn0L9S47nGldMw6B+3rwTttD2oi+2TsX+5Q bgPMSKUEqjbaRqB6gWTnd3ds+QxtH19F3rwUmF0+jcvk4CNcs7v/5XAfITrrmE4gtt1W JNcFpIk0oO0i97k0qbKQ0RRKjqK7Rc2365DY6SAG6iw+mwfc/11SskmxVHu0R8wqreRF wIx209WwE2ssTHG65LMwHqTp8dJAcmYAouefsdea9/eFoNQXv/NJHKEB7LqZ1glw8j9w Fypg== X-Gm-Message-State: AGi0PuZQJ9kSM2oNppE/y8DvWPPAJcggvzHLotckxcYDA6W5bFscN/7m 4CYSXVHSdzfKH9CkjDkehNO2QmjwePFTZbOgL5QhWRUiuo/nM6FT6Y8hjmdiNWqtBZb1BU46uoX sTcEjHinznjc6eyv9g3lNLzBz2LHkuNPO8kdd X-Received: by 2002:ac2:4c9a:: with SMTP id d26mr10014020lfl.112.1587383886177; Mon, 20 Apr 2020 04:58:06 -0700 (PDT) X-Received: by 2002:ac2:4c9a:: with SMTP id d26mr10014011lfl.112.1587383885965; Mon, 20 Apr 2020 04:58:05 -0700 (PDT) MIME-Version: 1.0 References: <20200420045952.GA61440@nevermore.foobar.lan> In-Reply-To: <20200420045952.GA61440@nevermore.foobar.lan> From: Achilles Gaikwad Date: Mon, 20 Apr 2020 17:27:54 +0530 Message-ID: Subject: Re: [PATCH v2] nfsd4: add filename to states output To: linux-nfs@vger.kernel.org Cc: bfields@fieldses.org, Trond Myklebust , Kenneth Dsouza Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org There's a minor Bug that needs squashing in the code I sent. I'll send a V3. :) Sorry for the trouble. Best, - Achilles --- On Mon, Apr 20, 2020 at 10:30 AM Achilles Gaikwad wrote: > > Add filename to states output for ease of debugging. > > Signed-off-by: Achilles Gaikwad > Signed-off-by: Kenneth Dsouza > --- > fs/nfsd/nfs4state.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > index e32ecedece0f..f1cc825ff20b 100644 > --- a/fs/nfsd/nfs4state.c > +++ b/fs/nfsd/nfs4state.c > @@ -2404,6 +2404,11 @@ static void states_stop(struct seq_file *s, void *v) > spin_unlock(&clp->cl_lock); > } > > +static void nfs4_show_fname(struct seq_file *s, struct nfsd_file *f) > +{ > + seq_printf(s, "filename: \"%pD2\"", f->nf_file); > +} > + > static void nfs4_show_superblock(struct seq_file *s, struct nfsd_file *f) > { > struct inode *inode = f->nf_inode; > @@ -2449,6 +2454,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) > > nfs4_show_superblock(s, file); > seq_printf(s, ", "); > + nfs4_show_fname(s, file); > + seq_printf(s, ", "); > nfs4_show_owner(s, oo); > seq_printf(s, " }\n"); > nfsd_file_put(file); > @@ -2480,6 +2487,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st) > nfs4_show_superblock(s, file); > /* XXX: open stateid? */ > seq_printf(s, ", "); > + nfs4_show_fname(s, file); > + seq_printf(s, ", "); > nfs4_show_owner(s, oo); > seq_printf(s, " }\n"); > nfsd_file_put(file); > @@ -2506,6 +2515,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st) > /* XXX: lease time, whether it's being recalled. */ > > nfs4_show_superblock(s, file); > + nfs4_show_fname(s, file); > seq_printf(s, " }\n"); > > return 0; > @@ -2524,6 +2534,7 @@ static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st) > /* XXX: What else would be useful? */ > > nfs4_show_superblock(s, file); > + nfs4_show_fname(s, file); > seq_printf(s, " }\n"); > > return 0; > -- > 2.25.3 >