Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[PATCH 0/13] sysfs lazification.

 
Goto page Previous  1, 2, 3, 4, 5
   Linux (Home) -> Kernel RSS
Next:  Accepted policykit-1 0.94-5 (source all i386)  
Author Message
Serge E. Hallyn

External


Since: Aug 13, 2005
Posts: 59



(Msg. 31) Posted: Wed Nov 04, 2009 10:25 am
Post subject: Re: [PATCH 14/13] sysfs: sysfs_setattr remove unnecessary permission check. [Login to view extended thread Info.]
Archived from groups: linux>kernel (more info?)

Quoting Eric W. Biederman (ebiederm@xmission.com):
>
> inode_change_ok already clears the SGID bit when necessary so there is
> no reason for sysfs_setattr to carry code to do the same, and it is
> good to kill the extra copy because when I moved the code, I goofed
> and in certain corner cases the code will look at the wrong gid.
>
> Signed-off-by: Eric W. Biederman <ebiederm RemoveThis @aristanetworks.com>

Acked-by: Serge Hallyn <serue RemoveThis @us.ibm.com>

> ---
> fs/sysfs/inode.c | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
> index 72e2e99..e2595a7 100644
> --- a/fs/sysfs/inode.c
> +++ b/fs/sysfs/inode.c
> @@ -120,10 +120,6 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
> return error;
>
> iattr->ia_valid &= ~ATTR_SIZE; /* ignore size changes */
> - if (iattr->ia_valid & ATTR_MODE) {
> - if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
> - iattr->ia_mode &= ~S_ISGID;
> - }
>
> error = inode_setattr(inode, iattr);
> if (error)
> --
> 1.6.5.2.143.g8cc62
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo RemoveThis @vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Serge E. Hallyn

External


Since: Aug 13, 2005
Posts: 59



(Msg. 32) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 13/13] sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Quoting Eric W. Biederman (ebiederm@xmission.com):
> From: Eric W. Biederman <ebiederm.RemoveThis@xmission.com>
>
> These two functions do 90% of the same work and it doesn't significantly
> obfuscate the function to allow both the parent dir and the name to change
> at the same time. So merge them together to simplify maintenance, and
> increase testing.
>
> Acked-by: Tejun Heo <tj.RemoveThis@kernel.org>
> Signed-off-by: Eric W. Biederman <ebiederm.RemoveThis@aristanetworks.com>

Based on just this patchset it seems sysfs_rename() could be static,
but since it isn't static I assume your later patchset will use it
outside fs/sysfs/dir.c?

Acked-by: Serge Hallyn <serue.RemoveThis@us.ibm.com>


> ---
> fs/sysfs/dir.c | 62 +++++++++++++++++++++++++----------------------------
> fs/sysfs/sysfs.h | 3 ++
> 2 files changed, 32 insertions(+), 33 deletions(-)
>
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index 0b60212..e1a86d1 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -760,30 +760,42 @@ void sysfs_remove_dir(struct kobject * kobj)
> __sysfs_remove_dir(sd);
> }
>
> -int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
> +int sysfs_rename(struct sysfs_dirent *sd,
> + struct sysfs_dirent *new_parent_sd, const char *new_name)
> {
> - struct sysfs_dirent *sd = kobj->sd;
> const char *dup_name = NULL;
> int error;
>
> mutex_lock(&sysfs_mutex);
>
> error = 0;
> - if (strcmp(sd->s_name, new_name) == 0)
> + if ((sd->s_parent == new_parent_sd) &&
> + (strcmp(sd->s_name, new_name) == 0))
> goto out; /* nothing to rename */
>
> error = -EEXIST;
> - if (sysfs_find_dirent(sd->s_parent, new_name))
> + if (sysfs_find_dirent(new_parent_sd, new_name))
> goto out;
>
> /* rename sysfs_dirent */
> - error = -ENOMEM;
> - new_name = dup_name = kstrdup(new_name, GFP_KERNEL);
> - if (!new_name)
> - goto out;
> + if (strcmp(sd->s_name, new_name) != 0) {
> + error = -ENOMEM;
> + new_name = dup_name = kstrdup(new_name, GFP_KERNEL);
> + if (!new_name)
> + goto out;
> +
> + dup_name = sd->s_name;
> + sd->s_name = new_name;
> + }
>
> - dup_name = sd->s_name;
> - sd->s_name = new_name;
> + /* Remove from old parent's list and insert into new parent's list. */
> + if (sd->s_parent != new_parent_sd) {
> + sysfs_unlink_sibling(sd);
> + sysfs_get(new_parent_sd);
> + sysfs_put(sd->s_parent);
> + sd->s_parent = new_parent_sd;
> + sysfs_link_sibling(sd);
> + }
>
> error = 0;
> out:
> @@ -792,37 +804,21 @@ int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
> return error;
> }
>
> +int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
> +{
> + return sysfs_rename(kobj->sd, kobj->sd->s_parent, new_name);
> +}
> +
> int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj)
> {
> struct sysfs_dirent *sd = kobj->sd;
> struct sysfs_dirent *new_parent_sd;
> - int error;
>
> BUG_ON(!sd->s_parent);
> -
> - mutex_lock(&sysfs_mutex);
> - new_parent_sd = (new_parent_kobj && new_parent_kobj->sd) ?
> + new_parent_sd = new_parent_kobj && new_parent_kobj->sd ?
> new_parent_kobj->sd : &sysfs_root;
>
> - error = 0;
> - if (sd->s_parent == new_parent_sd)
> - goto out; /* nothing to move */
> -
> - error = -EEXIST;
> - if (sysfs_find_dirent(new_parent_sd, sd->s_name))
> - goto out;
> -
> - /* Remove from old parent's list and insert into new parent's list. */
> - sysfs_unlink_sibling(sd);
> - sysfs_get(new_parent_sd);
> - sysfs_put(sd->s_parent);
> - sd->s_parent = new_parent_sd;
> - sysfs_link_sibling(sd);
> -
> - error = 0;
> -out:
> - mutex_unlock(&sysfs_mutex);
> - return error;
> + return sysfs_rename(sd, new_parent_sd, sd->s_name);
> }
>
> /* Relationship between s_mode and the DT_xxx types */
> diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
> index 98a15bf..ca52e7b 100644
> --- a/fs/sysfs/sysfs.h
> +++ b/fs/sysfs/sysfs.h
> @@ -130,6 +130,9 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name,
> struct sysfs_dirent **p_sd);
> void sysfs_remove_subdir(struct sysfs_dirent *sd);
>
> +int sysfs_rename(struct sysfs_dirent *sd,
> + struct sysfs_dirent *new_parent_sd, const char *new_name);
> +
> static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd)
> {
> if (sd) {
> --
> 1.6.5.2.143.g8cc62
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo.RemoveThis@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Eric W. Biederman

External


Since: Jul 26, 2005
Posts: 136



(Msg. 33) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 13/13] sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Serge E. Hallyn" <serue DeleteThis @us.ibm.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> From: Eric W. Biederman <ebiederm DeleteThis @xmission.com>
>>
>> These two functions do 90% of the same work and it doesn't significantly
>> obfuscate the function to allow both the parent dir and the name to change
>> at the same time. So merge them together to simplify maintenance, and
>> increase testing.
>>
>> Acked-by: Tejun Heo <tj DeleteThis @kernel.org>
>> Signed-off-by: Eric W. Biederman <ebiederm DeleteThis @aristanetworks.com>
>
> Based on just this patchset it seems sysfs_rename() could be static,
> but since it isn't static I assume your later patchset will use it
> outside fs/sysfs/dir.c?

To implement sysfs_rename_link, but that is too much to digest/review/push
all at once.

I have a snapshot of my development tree up on kernel.org if you are
interested.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Serge E. Hallyn

External


Since: Aug 13, 2005
Posts: 59



(Msg. 34) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 13/13] sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Quoting Eric W. Biederman (ebiederm@xmission.com):
> "Serge E. Hallyn" <serue.RemoveThis@us.ibm.com> writes:
>
> > Quoting Eric W. Biederman (ebiederm@xmission.com):
> >> From: Eric W. Biederman <ebiederm.RemoveThis@xmission.com>
> >>
> >> These two functions do 90% of the same work and it doesn't significantly
> >> obfuscate the function to allow both the parent dir and the name to change
> >> at the same time. So merge them together to simplify maintenance, and
> >> increase testing.
> >>
> >> Acked-by: Tejun Heo <tj.RemoveThis@kernel.org>
> >> Signed-off-by: Eric W. Biederman <ebiederm.RemoveThis@aristanetworks.com>
> >
> > Based on just this patchset it seems sysfs_rename() could be static,
> > but since it isn't static I assume your later patchset will use it
> > outside fs/sysfs/dir.c?
>
> To implement sysfs_rename_link, but that is too much to digest/review/push
> all at once.

Ok, just making sure it'll get used.

To repeat myself,

Acked-by: Serge Hallyn <serue.RemoveThis@us.ibm.com>

> I have a snapshot of my development tree up on kernel.org if you are
> interested.

I think this was an appropriately sized set Smile Might take a look this
weekend though.

thanks,
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Eric W. Biederman

External


Since: Jul 26, 2005
Posts: 136



(Msg. 35) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 13/13] sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Serge E. Hallyn" <serue.DeleteThis@us.ibm.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> "Serge E. Hallyn" <serue.DeleteThis@us.ibm.com> writes:
>>
>> > Quoting Eric W. Biederman (ebiederm@xmission.com):
>> >> From: Eric W. Biederman <ebiederm.DeleteThis@xmission.com>
>> >>
>> >> These two functions do 90% of the same work and it doesn't significantly
>> >> obfuscate the function to allow both the parent dir and the name to change
>> >> at the same time. So merge them together to simplify maintenance, and
>> >> increase testing.
>> >>
>> >> Acked-by: Tejun Heo <tj.DeleteThis@kernel.org>
>> >> Signed-off-by: Eric W. Biederman <ebiederm.DeleteThis@aristanetworks.com>
>> >
>> > Based on just this patchset it seems sysfs_rename() could be static,
>> > but since it isn't static I assume your later patchset will use it
>> > outside fs/sysfs/dir.c?
>>
>> To implement sysfs_rename_link, but that is too much to digest/review/push
>> all at once.
>
> Ok, just making sure it'll get used.
>
> To repeat myself,
>
> Acked-by: Serge Hallyn <serue.DeleteThis@us.ibm.com>
>
>> I have a snapshot of my development tree up on kernel.org if you are
>> interested.
>
> I think this was an appropriately sized set Smile Might take a look this
> weekend though.

Thanks for the review.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Eric W. Biederman

External


Since: Jul 26, 2005
Posts: 136



(Msg. 36) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 15/13] sysfs: Protect sysfs_refresh_inode with inode mutex. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Serge E. Hallyn" <serue.RemoveThis@us.ibm.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>>
>> In general everything that writes to vfs inodes holds the
>> inode mutex, so hold the inode mutex over sysfs_refresh_inode.
>> The sysfs data structures don't need this but it looks like the
>> vfs might.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm.RemoveThis@aristanetworks.com>
>
> Oh right so pls disregard my last reply to patch 9 Smile

I also checked and nfs has the same basic structure and does take the
inode mutex on these paths, inside of nfs_refresh_inode which is
called from __nfs_revalidate_inode.

So it is definitely the consistent thing to do.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Serge E. Hallyn

External


Since: Aug 13, 2005
Posts: 59



(Msg. 37) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 12/13] sysfs: Propagate renames to the vfs on demand [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Quoting Eric W. Biederman (ebiederm@xmission.com):
> From: Eric W. Biederman <ebiederm.DeleteThis@xmission.com>
>
> By teaching sysfs_revalidate to hide a dentry for
> a sysfs_dirent if the sysfs_dirent has been renamed,
> and by teaching sysfs_lookup to return the original
> dentry if the sysfs dirent has been renamed. I can
> show the results of renames correctly without having to
> update the dcache during the directory rename.
>
> This massively simplifies the rename logic allowing a lot
> of weird sysfs special cases to be removed along with
> a lot of now unnecesary helper code.
>
> Acked-by: Tejun Heo <tj.DeleteThis@kernel.org>
> Signed-off-by: Eric W. Biederman <ebiederm.DeleteThis@aristanetworks.com>

Patch looks *great*, except:

....

> @@ -315,6 +274,14 @@ static int sysfs_dentry_revalidate(struct dentry *dentry, struct nameidata *nd)
> if (sd->s_flags & SYSFS_FLAG_REMOVED)
> goto out_bad;
>
> + /* The sysfs dirent has been moved? */
> + if (dentry->d_parent->d_fsdata != sd->s_parent)
> + goto out_bad;
> +
> + /* The sysfs dirent has been renamed */
> + if (strcmp(dentry->d_name.name, sd->s_name) != 0)
> + goto out_bad;
> +
> mutex_unlock(&sysfs_mutex);
> out_valid:
> return 1;
> @@ -322,6 +289,12 @@ out_bad:
> /* Remove the dentry from the dcache hashes.
> * If this is a deleted dentry we use d_drop instead of d_delete
> * so sysfs doesn't need to cope with negative dentries.
> + *
> + * If this is a dentry that has simply been renamed we
> + * use d_drop to remove it from the dcache lookup on its
> + * old parent. If this dentry persists later when a lookup
> + * is performed at its new name the dentry will be readded
> + * to the dcache hashes.
> */
> is_dir = (sysfs_type(sd) == SYSFS_DIR);
> mutex_unlock(&sysfs_mutex);

After this, if (is_dir) and (have_submounts(dentry)) then you'll
still goto out_valid and return 1. Is that what you want?

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Eric W. Biederman

External


Since: Jul 26, 2005
Posts: 136



(Msg. 38) Posted: Thu Nov 05, 2009 7:25 am
Post subject: Re: [PATCH 12/13] sysfs: Propagate renames to the vfs on demand [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Serge E. Hallyn" <serue RemoveThis @us.ibm.com> writes:

> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> From: Eric W. Biederman <ebiederm RemoveThis @xmission.com>
>>
>> By teaching sysfs_revalidate to hide a dentry for
>> a sysfs_dirent if the sysfs_dirent has been renamed,
>> and by teaching sysfs_lookup to return the original
>> dentry if the sysfs dirent has been renamed. I can
>> show the results of renames correctly without having to
>> update the dcache during the directory rename.
>>
>> This massively simplifies the rename logic allowing a lot
>> of weird sysfs special cases to be removed along with
>> a lot of now unnecesary helper code.
>>
>> Acked-by: Tejun Heo <tj RemoveThis @kernel.org>
>> Signed-off-by: Eric W. Biederman <ebiederm RemoveThis @aristanetworks.com>
>
> Patch looks *great*, except:
>
> ...
>
>> @@ -315,6 +274,14 @@ static int sysfs_dentry_revalidate(struct dentry *dentry, struct nameidata *nd)
>> if (sd->s_flags & SYSFS_FLAG_REMOVED)
>> goto out_bad;
>>
>> + /* The sysfs dirent has been moved? */
>> + if (dentry->d_parent->d_fsdata != sd->s_parent)
>> + goto out_bad;
>> +
>> + /* The sysfs dirent has been renamed */
>> + if (strcmp(dentry->d_name.name, sd->s_name) != 0)
>> + goto out_bad;
>> +
>> mutex_unlock(&sysfs_mutex);
>> out_valid:
>> return 1;
>> @@ -322,6 +289,12 @@ out_bad:
>> /* Remove the dentry from the dcache hashes.
>> * If this is a deleted dentry we use d_drop instead of d_delete
>> * so sysfs doesn't need to cope with negative dentries.
>> + *
>> + * If this is a dentry that has simply been renamed we
>> + * use d_drop to remove it from the dcache lookup on its
>> + * old parent. If this dentry persists later when a lookup
>> + * is performed at its new name the dentry will be readded
>> + * to the dcache hashes.
>> */
>> is_dir = (sysfs_type(sd) == SYSFS_DIR);
>> mutex_unlock(&sysfs_mutex);
>
> After this, if (is_dir) and (have_submounts(dentry)) then you'll
> still goto out_valid and return 1. Is that what you want?

It isn't what I want but it is what the VFS requires. If let the vfs
continue on it's delusional state we will leak the vfs mount and
everything mounted on top of it, with no way to remove the mounts.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Greg KH

External


Since: Jul 06, 2005
Posts: 146



(Msg. 39) Posted: Fri Nov 06, 2009 7:25 pm
Post subject: Re: [PATCH 0/13] sysfs lazification. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, Nov 03, 2009 at 03:53:56AM -0800, Eric W. Biederman wrote:
>
> The sysfs code updates the vfs caches immediately when the sysfs data
> structures change causing a lot of unnecessary complications. The
> following patchset untangles that beast. Allowing for simpler
> more straight forward code, the removal of a hack from the vfs
> to support sysfs, and human comprehensible locking on sysfs.
>
> Most of these patches have already been reviewed and acked from the
> last time I had time to work on sysfs.
>
> In net the patches look like:

Can you resend these based on the review that you just got, with the new
acks and changes so that I can apply them?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Aug 27, 2009
Posts: 24



(Msg. 40) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 09/13] sysfs: Implement sysfs_getattr & sysfs_permission [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric W. Biederman wrote:
> diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
> index 1137418..c5eff49 100644
> --- a/fs/sysfs/symlink.c
> +++ b/fs/sysfs/symlink.c
> @@ -214,6 +214,9 @@ const struct inode_operations sysfs_symlink_inode_operations = {
> .readlink = generic_readlink,
> .follow_link = sysfs_follow_link,
> .put_link = sysfs_put_link,
> + .setattr = sysfs_setattr,

It would be nice either to separate addition of setattr to symlinks
into a separate patch or note it in the description.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Aug 27, 2009
Posts: 24



(Msg. 41) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 11/13] sysfs: Gut sysfs_addrm_start and sysfs_addrm_finish [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm.DeleteThis@aristanetworks.com>
>
> With lazy inode updates and dentry operations bringing everything
> into sync on demand there is no longer any need to immediately
> update the vfs or grab i_mutex to protect those updates as we
> make changes to sysfs.
>
> Signed-off-by: Eric W. Biederman <ebiederm.DeleteThis@aristanetworks.com>

Acked-by: Tejun Heo <tj.DeleteThis@kernel.org>

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Aug 27, 2009
Posts: 24



(Msg. 42) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 12/13] sysfs: Propagate renames to the vfs on demand [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello,

Eric W. Biederman wrote:
> It isn't what I want but it is what the VFS requires. If let the vfs
> continue on it's delusional state we will leak the vfs mount and
> everything mounted on top of it, with no way to remove the mounts.

This is caused by not having any way to prevent deletion on
directories with submounts, right? How does other distributed
filesystems deal with directories with submounts going away underneath
it?

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Eric W. Biederman

External


Since: Jul 26, 2005
Posts: 136



(Msg. 43) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 12/13] sysfs: Propagate renames to the vfs on demand [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tejun Heo <tj.DeleteThis@kernel.org> writes:

> Hello,
>
> Eric W. Biederman wrote:
>> It isn't what I want but it is what the VFS requires. If let the vfs
>> continue on it's delusional state we will leak the vfs mount and
>> everything mounted on top of it, with no way to remove the mounts.
>
> This is caused by not having any way to prevent deletion on
> directories with submounts, right? How does other distributed
> filesystems deal with directories with submounts going away underneath
> it?

NFS does exactly the same thing I am doing.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Aug 27, 2009
Posts: 24



(Msg. 44) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 14/13] sysfs: sysfs_setattr remove unnecessary permission check. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric W. Biederman wrote:
> inode_change_ok already clears the SGID bit when necessary so there is
> no reason for sysfs_setattr to carry code to do the same, and it is
> good to kill the extra copy because when I moved the code, I goofed
> and in certain corner cases the code will look at the wrong gid.
>
> Signed-off-by: Eric W. Biederman <ebiederm RemoveThis @aristanetworks.com>

Acked-by: Tejun Heo <tj RemoveThis @kernel.org>

I would much prefer this one being prior to 06 but if it's too
painful, please at least note it in the description of 06.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Aug 27, 2009
Posts: 24



(Msg. 45) Posted: Fri Nov 06, 2009 11:25 pm
Post subject: Re: [PATCH 12/13] sysfs: Propagate renames to the vfs on demand [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello,

Eric W. Biederman wrote:
> NFS does exactly the same thing I am doing.

Oh... well, sysfs directories parenting other filesystems are pretty
rare and well defined. Although it's not very pretty, I don't think
we'll see any actual problem there. Thanks for the explanation.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[ PATCH 2.6.16-rc3-xen 2/3] sysfs: export Xen hypervisor a.. - # HG changeset patch # User mdday@dual.silverwood.home # Node ID f5f32dc60121c32fab158a814c914aae3b77ba06 # Parent d296aaf07bcb4141c6dc2a1bfa7d183f919c2167 Add tri-state Kconfig option for building xen-sysfs module. signed-off-by: Mike D. Day..

[ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor a.. - This series of patches is a module that exports Xen Hypervisor attributes to sysfs. The directory structure created is: +---sys +---hypervisor +---xen +---version +---major +---minor +---extra +---compilation +---by +---date..

[ PATCH 2.6.16-rc3-xen 3/3] sysfs: export Xen hypervisor a.. - # HG changeset patch # User mdday@dual.silverwood.home # Node ID 10c66e0408d1b22db15b8943223f1b6d7713422d # Parent f5f32dc60121c32fab158a814c914aae3b77ba06 Module that exports Xen Hypervisor attributes to /sys/hypervisor. signed-off-by: Mike D. Day..

[PATCH 2/7] tpm: reorganize sysfs files - Updated patch - Many of the sysfs files were calling the TPM_GetCapability command with different options and each command layed out in its own static const array. Since for 1.2 more sysfs files of this type are coming I am generalizing the array so there can be one..

[2.6 patch] SECURITY must depend on SYSFS - CONFIG_SECURITY=y and CONFIG_SYSFS=n results in the following compile error: <-- snip --> .... LD vmlinux security/built-in.o: In function `securityfs_init': inode.c:(.init.text+0x1c2): undefined reference to `kernel_subsys' make: ***..
       Linux (Home) -> Kernel All times are: Pacific Time (US & Canada) (change)
Goto page Previous  1, 2, 3, 4, 5
Page 3 of 5

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact