From: Josef Bacik <josef@toxicpanda.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] btrfs: use simple_dir_inode_operations for placeholder subvolume directory
Date: Fri, 6 Dec 2019 10:09:21 -0500 [thread overview]
Message-ID: <20191206150921.7npbjlbbgktxgazl@jbacik-mbp> (raw)
In-Reply-To: <3cc2030c10bcef05fe39f0fe2e8cdfb61c6c0faf.1575570955.git.osandov@fb.com>
On Thu, Dec 05, 2019 at 10:36:04AM -0800, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> When you snapshot a subvolume containing a subvolume, you get a
> placeholder directory where the subvolume would be. These directories
> have their own btrfs_dir_ro_inode_operations.
>
> Al pointed out [1] that these directories can use simple_lookup()
> instead of btrfs_lookup(), as they are always empty. Furthermore, they
> can use the default generic_permission() instead of btrfs_permission();
> the additional checks in the latter don't matter because we can't write
> to the directory anyways. Finally, they can use the default
> generic_update_time() instead of btrfs_update_time(), as the inode
> doesn't exist on disk and doesn't need any special handling.
>
> All together, this means that we can get rid of
> btrfs_dir_ro_inode_operations and use simple_dir_inode_operations
> instead.
>
> 1: https://lore.kernel.org/linux-btrfs/20190929052934.GY26530@ZenIV.linux.org.uk/
>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Thanks,
Josef
next prev parent reply other threads:[~2019-12-06 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 18:36 [PATCH] btrfs: use simple_dir_inode_operations for placeholder subvolume directory Omar Sandoval
2019-12-06 15:09 ` Josef Bacik [this message]
2019-12-09 16:33 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191206150921.7npbjlbbgktxgazl@jbacik-mbp \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=osandov@osandov.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).