From patchwork Tue May 17 21:57:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 9115391 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 346C19FB14 for ; Tue, 17 May 2016 21:57:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4790320148 for ; Tue, 17 May 2016 21:57:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55FC820253 for ; Tue, 17 May 2016 21:57:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbcEQV52 (ORCPT ); Tue, 17 May 2016 17:57:28 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34617 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbcEQV50 (ORCPT ); Tue, 17 May 2016 17:57:26 -0400 Received: by mail-wm0-f66.google.com with SMTP id n129so8166738wmn.1 for ; Tue, 17 May 2016 14:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=b95FVil+0I1Hc/9JEFOeOgHqMme8WFnrG/XoAoSz0gA=; b=Jh2MmqWY2i7C5tYog6QxISeqUVr2c7AIEixtkMRDR+0mqwycJrYwefSGKlfEQ7D5An K1rbgFRD/Z6l+qhI47Vy56E3/v+NjdV/5zzSDLwOF7xR3DZwGGbXVuEhaP6Ey4E59fmE eG16PaX3vSkKQs1KgXlncVcvHxgfvXhD5lhjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=b95FVil+0I1Hc/9JEFOeOgHqMme8WFnrG/XoAoSz0gA=; b=gABoFpM1R64Sk/oOKX12KAqgJxGfexh0ZdDM73eaRGKB2Sn04BXFvQdK7qLeDg77EH efmydyDBOKIaQtp8J/OO+g/wryzFftuASjwntnAmZEt0z7G97xLZk3FnB+3Wgs8oMr1p 30icPwQ8vF70qfYaeN2YnrT7XPwylEJV9q5MNYLwJ1Rtr7EBkkF8dP4nfc+k+o4mqJNQ gZSjSg+sDUMMe/yCIcaN2NIcwVmm9XK97DeKUuiSxznk605EIXWUMKkpjElAzDgJZk19 Un/IRLN336h8VQrDNgR33a8OAu3BtodrR3FjT/+cV1g6Bq15PZ4xb3gx1lq47C99KEcP fU7w== X-Gm-Message-State: AOPr4FU1aOHW4hihBCdpb2YEdriFzuF4Z4Dq5eXsnpxhsVkWwWPLjVGJLSaBvdxsmj9Zeg== X-Received: by 10.28.158.69 with SMTP id h66mr461062wme.1.1463522245046; Tue, 17 May 2016 14:57:25 -0700 (PDT) Received: from veci.piliscsaba.szeredi.hu (pool-dsl-2c-0018.externet.hu. [217.173.44.24]) by smtp.gmail.com with ESMTPSA id t201sm26153400wme.11.2016.05.17.14.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 May 2016 14:57:24 -0700 (PDT) Date: Tue, 17 May 2016 23:57:22 +0200 From: Miklos Szeredi To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, David Howells Subject: [PATCH 3/3] vfs: clean up documentation Message-ID: <20160517215722.GC1589@veci.piliscsaba.szeredi.hu> References: <20160517215326.GA1589@veci.piliscsaba.szeredi.hu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160517215326.GA1589@veci.piliscsaba.szeredi.hu> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Miklos Szeredi --- Documentation/filesystems/Locking | 2 -- Documentation/filesystems/vfs.txt | 24 ++++++++---------------- 2 files changed, 8 insertions(+), 18 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -68,7 +68,6 @@ d_real no no yes no struct file *, unsigned open_flag, umode_t create_mode, int *opened); int (*tmpfile) (struct inode *, struct dentry *, umode_t); - int (*dentry_open)(struct dentry *, struct file *, const struct cred *); locking rules: all may block @@ -97,7 +96,6 @@ fiemap: no update_time: no atomic_open: yes tmpfile: no -dentry_open: no Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on victim. --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -364,7 +364,6 @@ struct inode_operations { int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode, int *opened); int (*tmpfile) (struct inode *, struct dentry *, umode_t); - int (*dentry_open)(struct dentry *, struct file *, const struct cred *); }; Again, all methods are called without any locks being held, unless @@ -696,13 +695,6 @@ struct address_space_operations { but instead uses bmap to find out where the blocks in the file are and uses those addresses directly. - dentry_open: *WARNING: probably going away soon, do not use!* This is an - alternative to f_op->open(), the difference is that this method may open - a file not necessarily originating from the same filesystem as the one - i_op->open() was called on. It may be useful for stacking filesystems - which want to allow native I/O directly on underlying files. - - invalidatepage: If a page has PagePrivate set, then invalidatepage will be called when part or all of the page is to be removed from the address space. This generally corresponds to either a @@ -1023,6 +1015,14 @@ struct dentry_operations { at the end of the buffer, and returns a pointer to the first char. dynamic_dname() helper function is provided to take care of this. + Example : + + static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) + { + return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", + dentry->d_inode->i_ino); + } + d_automount: called when an automount dentry is to be traversed (optional). This should create a new VFS mount record and return the record to the caller. The caller is supplied with a path parameter giving the @@ -1079,14 +1079,6 @@ struct dentry_operations { This method is never called with both non-NULL inode and non-zero flags. -Example : - -static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) -{ - return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", - dentry->d_inode->i_ino); -} - Each dentry has a pointer to its parent dentry, as well as a hash list of child dentries. Child dentries are basically like files in a directory.