[Devel] Re: [PATCH 08/10] Define get_sb_ref()
sukadev at linux.vnet.ibm.com
sukadev at linux.vnet.ibm.com
Fri Sep 26 17:47:27 PDT 2008
Dave Hansen [dave at linux.vnet.ibm.com] wrote:
| On Fri, 2008-09-26 at 14:21 -0700, sukadev at linux.vnet.ibm.com wrote:
| > Dave Hansen [dave at linux.vnet.ibm.com] wrote:
| > | On Fri, 2008-09-12 at 10:53 -0700, sukadev at us.ibm.com wrote:
| > | > + * But for single-mount semantics, devpts cannot use get_sb_single(),
| > | > + * because get_sb_single()/sget() find and use the super-block from
| > | > + * the most recent mount of devpts. But that recent mount may be a
| > | > + * 'newinstance' mount and get_sb_single() would pick the newinstance
| > | > + * super-block instead of the initial super-block.
| > |
| > | Can't you just override the test() function to get what you want here?
| >
| > get_sb_single() does not take a test() parameter and so I would still
| > need a get_sb_ref() or get_sb_special() interface right ?
| >
| > This special interface could call sget() with a custom-test function,
| > to get the super-block. But in case of devpts, we already have the
| > super-block. So we don't need to call sget(). We just need get a reference
| > and remount.
|
| Well, you shouldn't be using get_sb_single() at all any more, right?
You mean define something like get_sb_multi_mode() and define a new
test function ? I can try that.
|
| At this point, you're doing something super-specialized for devpts. So,
| why do this in super.c. Just put it in place of devpts_get_sb()'s
| current contents.
grab_super() is static. I have to either externalize it or define the
new interface in fs/super.c. I am not sure if mqueue ns or others have
similar semantics and if so, defining interface in fs/super.c has a better
chance of being found/generalized when there is another user.
|
| For me get_sb_ref() is a super-confusing name, especially when mixed
| with all the other sb functions. WTF is get_sb() doing if there's a
| get_sb_ref()?
I agree its not a great name. The 'get_sb's do several things some in
private interfaces, and I needed only a subset of them.
Do you have any preference over get_sb_multi_mode() over exporting
grab_super() and moving the pts-specific stuff to into devpts/inode.c
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list