From: Xiubo Li Subject: Re: [PATCH] ceph: add 'fs' mount option support Date: Mon, 24 Feb 2020 10:41:58 +0800 Message-ID: <33fb49fe-87bc-b5d3-f717-3c22c7a15030@redhat.com> References: <20200223021440.40257-1-xiubli@redhat.com> <552341c730d2835b1492599fce319ae91a34f504.camel@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56215 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727156AbgBXCmO (ORCPT ); Sun, 23 Feb 2020 21:42:14 -0500 In-Reply-To: <552341c730d2835b1492599fce319ae91a34f504.camel@kernel.org> Content-Language: en-US Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Jeff Layton , idryomov@gmail.com Cc: sage@redhat.com, zyan@redhat.com, pdonnell@redhat.com, ceph-devel@vger.kernel.org On 2020/2/23 22:56, Jeff Layton wrote: > On Sat, 2020-02-22 at 21:14 -0500, xiubli@redhat.com wrote: >> From: Xiubo Li >> >> The 'fs' here will be cleaner when specifying the ceph fs name, >> and we can easily get the corresponding name from the `ceph fs >> dump`: >> >> [...] >> Filesystem 'a' (1) >> fs_name a >> epoch 12 >> flags 12 >> [...] >> >> The 'fs' here just an alias name for 'mds_namespace' mount options, >> and we will keep 'mds_namespace' for backwards compatibility. >> >> URL: https://tracker.ceph.com/issues/44214 >> Signed-off-by: Xiubo Li > It looks like mds_namespace feature went into the kernel in 2016 (in > v4.7). We're at v5.5 today, so that's a large swath of kernels in the > field that only support the old option. > > While I agree that 'fs=' would have been cleaner and more user-friendly, > I've found that it's just not worth it to add mount option aliases like > this unless you have a really good reason. It all ends up being a huge > amount of churn for little benefit. > > The problem with changing it after the fact like this is that you still > have to support both options forever. Removing support isn't worth the > pain as you can break working environments. When working environments > upgrade they won't change to use the new option (why bother?) > > Maybe it would be good to start this change by doing a "fs=" to > "mds_namespace=" translation in the mount helper? That would make the > new option work across older kernel releases too, and make it simpler to > document what options are supported. This sounds a pretty good idea for me. >> @@ -561,8 +562,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) >> if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0) >> seq_puts(m, ",copyfrom"); >> >> - if (fsopt->mds_namespace) >> - seq_show_option(m, "mds_namespace", fsopt->mds_namespace); >> + if (fsopt->fs_name) >> + seq_show_option(m, "fs", fsopt->fs_name); > Someone will mount with mds_namespace= but then that will be converted > to fs= when displaying options here. It's not necessarily a problem but > it may be noticed by some users. Yeah, but if we convert 'fs=' to 'mds_namespace=' in userland and here it will always showing with 'mds_namespace=', won't it be the same issue? Or should we covert it to "fs/mds_namespace=" here ? Will it make sense ? Thanks BRs