From: Xiubo Li <xiubli@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: idryomov@gmail.com, zyan@redhat.com, pdonnell@redhat.com,
ceph-devel@vger.kernel.org
Subject: Re: [PATCH] ceph: add 'noshare' mount option support
Date: Wed, 14 Oct 2020 18:19:14 +0800 [thread overview]
Message-ID: <e9239002-5a87-a2cb-7cbf-6941c1446c5a@redhat.com> (raw)
In-Reply-To: <0f0d753bee2de1f353dc2d63d2146fb744f27381.camel@kernel.org>
On 2020/10/13 21:41, Jeff Layton wrote:
> On Tue, 2020-10-13 at 20:44 +0800, Xiubo Li wrote:
>> On 2020/10/13 20:31, Jeff Layton wrote:
>>> On Tue, 2020-10-13 at 18:31 +0800, xiubli@redhat.com wrote:
>>>> From: Xiubo Li <xiubli@redhat.com>
>>>>
>>>> This will disable different mount points to share superblocks.
>>>>
>>> Why? What problem does this solve? Don't make us dig through random
>>> tracker bugs to determine this, please. :)
>> So, should we just mannully trigger to crash the kernel to get the
>> coredump ?
>>
> Looking at the tracker ticket, it looks like you want this to work
> around some issues with lazy unmounts in tests. If so, then sure,
> forcing a coredump might give you an indication of what happened.
>
> In general though, this sounds like a hacky workaround for the problem
> in that tracker. I suggest we don't do this and work toward solving the
> real problems that caused the test writers to use lazy umounts in the
> first place...
Okay, will try this.
Thanks.
>>> Also, the subject mentions a "noshare" mount option, but the code below
>>> will be expecting sharesb/nosharesb.
>>>
>>>> URL: https://tracker.ceph.com/issues/46883
>>>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>>>> ---
>>>> fs/ceph/super.c | 12 ++++++++++++
>>>> fs/ceph/super.h | 1 +
>>>> 2 files changed, 13 insertions(+)
>>>>
>>>> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
>>>> index 2f530a111b3a..6f283e4d62ee 100644
>>>> --- a/fs/ceph/super.c
>>>> +++ b/fs/ceph/super.c
>>>> @@ -159,6 +159,7 @@ enum {
>>>> Opt_quotadf,
>>>> Opt_copyfrom,
>>>> Opt_wsync,
>>>> + Opt_sharesb,
>>>> };
>>>>
>>>> enum ceph_recover_session_mode {
>>>> @@ -199,6 +200,7 @@ static const struct fs_parameter_spec ceph_mount_parameters[] = {
>>>> fsparam_string ("source", Opt_source),
>>>> fsparam_u32 ("wsize", Opt_wsize),
>>>> fsparam_flag_no ("wsync", Opt_wsync),
>>>> + fsparam_flag_no ("sharesb", Opt_sharesb),
>>>> {}
>>>> };
>>>>
>>>> @@ -455,6 +457,12 @@ static int ceph_parse_mount_param(struct fs_context *fc,
>>>> else
>>>> fsopt->flags |= CEPH_MOUNT_OPT_ASYNC_DIROPS;
>>>> break;
>>>> + case Opt_sharesb:
>>>> + if (!result.negated)
>>>> + fsopt->flags &= ~CEPH_MOUNT_OPT_NO_SHARE_SB;
>>>> + else
>>>> + fsopt->flags |= CEPH_MOUNT_OPT_NO_SHARE_SB;
>>>> + break;
>>>> default:
>>>> BUG();
>>>> }
>>>> @@ -1007,6 +1015,10 @@ static int ceph_compare_super(struct super_block *sb, struct fs_context *fc)
>>>>
>>>> dout("ceph_compare_super %p\n", sb);
>>>>
>>>> + if (fsopt->flags & CEPH_MOUNT_OPT_NO_SHARE_SB ||
>>>> + other->mount_options->flags & CEPH_MOUNT_OPT_NO_SHARE_SB)
>>>> + return 0;
>>>> +
>>>> if (compare_mount_options(fsopt, opt, other)) {
>>>> dout("monitor(s)/mount options don't match\n");
>>>> return 0;
>>>> diff --git a/fs/ceph/super.h b/fs/ceph/super.h
>>>> index f097237a5ad3..e877c21196e5 100644
>>>> --- a/fs/ceph/super.h
>>>> +++ b/fs/ceph/super.h
>>>> @@ -44,6 +44,7 @@
>>>> #define CEPH_MOUNT_OPT_NOQUOTADF (1<<13) /* no root dir quota in statfs */
>>>> #define CEPH_MOUNT_OPT_NOCOPYFROM (1<<14) /* don't use RADOS 'copy-from' op */
>>>> #define CEPH_MOUNT_OPT_ASYNC_DIROPS (1<<15) /* allow async directory ops */
>>>> +#define CEPH_MOUNT_OPT_NO_SHARE_SB (1<<16) /* disable sharing the same superblock */
>>>>
>>>> #define CEPH_MOUNT_OPT_DEFAULT \
>>>> (CEPH_MOUNT_OPT_DCACHE | \
>>
prev parent reply other threads:[~2020-10-14 10:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 10:31 [PATCH] ceph: add 'noshare' mount option support xiubli
2020-10-13 12:31 ` Jeff Layton
2020-10-13 12:44 ` Xiubo Li
2020-10-13 13:41 ` Jeff Layton
2020-10-14 10:19 ` Xiubo Li [this message]
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=e9239002-5a87-a2cb-7cbf-6941c1446c5a@redhat.com \
--to=xiubli@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=pdonnell@redhat.com \
--cc=zyan@redhat.com \
/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).