linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: Re: [PoC 2/7] Add kobject to super_block
Date: Fri, 29 Apr 2016 14:09:54 -0500	[thread overview]
Message-ID: <5723B182.4080705@suse.de> (raw)
In-Reply-To: <20160429022628.GX25498@ZenIV.linux.org.uk>



On 04/28/2016 09:26 PM, Al Viro wrote:
> On Thu, Apr 28, 2016 at 09:01:17PM -0500, Goldwyn Rodrigues wrote:
>> @@ -167,7 +204,8 @@ static void destroy_super(struct super_block *s)
>>   	WARN_ON(!list_empty(&s->s_mounts));
>>   	kfree(s->s_subtype);
>>   	kfree(s->s_options);
>> -	call_rcu(&s->rcu, destroy_super_rcu);
>> +	if (s->s_type->fs_flags & FS_CREATE_SYSFS)
>> +		kobject_del(&s->s_kobj);
>
> So we have kobject_del() under a spinlock.  Wonderful...  Better yet,
> you have the sodding kobjects sitting around well past the point when
> the filesystem driver has gone through rmmod.
>
> sysfs: lifetime rules made simple.  So simple that they don't fit a lot of
> situations, but hey - it sure *looks* easy to use...
>
> NAK.  If you want a description of super_block life cycle, I can describe it
> to you.  But please, don't play with it until you understand it.
>


Yes, I understand what you are trying to say. Using kobject to destroy 
super_block does not make sense in the current scenario.

Thanks for your feedback.

-- 
Goldwyn

  reply	other threads:[~2016-04-29 19:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  2:01 [PoC 0/7] Kobjectify filesystem Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 1/7] Add kset to file_system_type Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 2/7] Add kobject to super_block Goldwyn Rodrigues
2016-04-29  2:26   ` Al Viro
2016-04-29 19:09     ` Goldwyn Rodrigues [this message]
2016-04-29  2:01 ` [PoC 3/7] Create sysfs files under sb Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 4/7] Report file system events Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 5/7] ocfs2: Use the sb's kset Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 6/7] ocfs2: create filecheck files Goldwyn Rodrigues
2016-04-29  2:01 ` [PoC 7/7] ocfs2: report inode errors to userspace Goldwyn Rodrigues
2016-04-29 17:32 ` [PoC 0/7] Kobjectify filesystem Viacheslav Dubeyko
2016-04-29 18:28   ` Goldwyn Rodrigues
2016-04-29 20:16     ` Viacheslav Dubeyko
2016-04-29 22:09       ` Goldwyn Rodrigues
2016-04-29 22:31     ` Al Viro
2016-04-29 22:45       ` Goldwyn Rodrigues
2016-05-04 22:20       ` Dave Chinner

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=5723B182.4080705@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rgoldwyn@suse.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).