From: Stephen Rothwell on
Hi Greg,

After merging the staging-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/md/md.c: In function 'level_store':
drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'

Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
Implement sysfs tagged directory support") from the driver-core tree
interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
manage redundancy group in sysfs when changing level") from the md.

I have applied this fixup patch for today and can carry it as necessary.

[This could have been avoided, of course, by creating a new API (maybe
sysfs_get_dirent_tagged) and implementing the old API in terms of that].

From: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Fri, 30 Apr 2010 15:00:20 +1000
Subject: [PATCH] md: fixup for sysfs_get_dirent API change

Signed-off-by: Stephen Rothwell <sfr(a)canb.auug.org.au>
---
drivers/md/md.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7f23558..b075b26 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3026,7 +3026,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
printk(KERN_WARNING
"md: cannot register extra attributes for %s\n",
mdname(mddev));
- mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action");
+ mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, NULL, "sync_action");
}
if (mddev->pers->sync_request != NULL &&
pers->sync_request == NULL) {
--
1.7.1

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Fri, Apr 30, 2010 at 03:52:05PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> After merging the staging-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/md/md.c: In function 'level_store':
> drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'
>
> Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
> Implement sysfs tagged directory support") from the driver-core tree
> interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
> manage redundancy group in sysfs when changing level") from the md.
>
> I have applied this fixup patch for today and can carry it as necessary.

Thanks, that would be great.

> [This could have been avoided, of course, by creating a new API (maybe
> sysfs_get_dirent_tagged) and implementing the old API in terms of that].

Hm Eric, any thoughts?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Eric W. Biederman on
Greg KH <greg(a)kroah.com> writes:

> On Fri, Apr 30, 2010 at 03:52:05PM +1000, Stephen Rothwell wrote:
>> Hi Greg,
>>
>> After merging the staging-next tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> drivers/md/md.c: In function 'level_store':
>> drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'
>>
>> Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
>> Implement sysfs tagged directory support") from the driver-core tree
>> interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
>> manage redundancy group in sysfs when changing level") from the md.
>>
>> I have applied this fixup patch for today and can carry it as necessary.
>
> Thanks, that would be great.
>
>> [This could have been avoided, of course, by creating a new API (maybe
>> sysfs_get_dirent_tagged) and implementing the old API in terms of that].
>
> Hm Eric, any thoughts?

I believe I touched all of the users of sysfs_get_dirent outside of sysfs
that existed when I sent you the patch.

Right now using sysfs_get_dirent is a hack to support notifications of
changes to sysfs files from atomic contexts, where sysfs_notify is
unsafe because it sleeps on sysfs_mutex. There are maybe 5 callers of
sysfs_get_dirent outside of sysfs. Given that we have a nice compile
time error I don't think it makes sense to have multiple versions of the
function.

It will probably makes sense at some point to go through and push
everything to using a less hacky solution, but for the moment the
solution is correct and doesn't cause too much pain so I'm not too
worried about it.

As for the fixup patch itself it looked correct.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Neil Brown on
On Fri, 30 Apr 2010 07:43:40 -0700
Greg KH <greg(a)kroah.com> wrote:

> On Fri, Apr 30, 2010 at 03:52:05PM +1000, Stephen Rothwell wrote:
> > Hi Greg,
> >
> > After merging the staging-next tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/md/md.c: In function 'level_store':
> > drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'
> >
> > Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
> > Implement sysfs tagged directory support") from the driver-core tree
> > interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
> > manage redundancy group in sysfs when changing level") from the md.
> >
> > I have applied this fixup patch for today and can carry it as necessary.
> >
> > [This could have been avoided, of course, by creating a new API (maybe
> > sysfs_get_dirent_tagged) and implementing the old API in terms of that].
>
> Thanks for the fixup.

hi Greg,
I'm assuming that you will submit you patch queue to Linus first, then I
will create a merge which fixes this issue and ask Linus to pull that - so
everything is all still bisectable without me rebasing.

If you are OK with that, please let me know when you have submitted your
queue.. I'll try to keep and eye open, but I might miss it...

Thanks,
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Tue, May 18, 2010 at 03:30:20PM +1000, Neil Brown wrote:
> On Fri, 30 Apr 2010 07:43:40 -0700
> Greg KH <greg(a)kroah.com> wrote:
>
> > On Fri, Apr 30, 2010 at 03:52:05PM +1000, Stephen Rothwell wrote:
> > > Hi Greg,
> > >
> > > After merging the staging-next tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > drivers/md/md.c: In function 'level_store':
> > > drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'
> > >
> > > Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
> > > Implement sysfs tagged directory support") from the driver-core tree
> > > interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
> > > manage redundancy group in sysfs when changing level") from the md.
> > >
> > > I have applied this fixup patch for today and can carry it as necessary.
> > >
> > > [This could have been avoided, of course, by creating a new API (maybe
> > > sysfs_get_dirent_tagged) and implementing the old API in terms of that].
> >
> > Thanks for the fixup.
>
> hi Greg,
> I'm assuming that you will submit you patch queue to Linus first, then I
> will create a merge which fixes this issue and ask Linus to pull that - so
> everything is all still bisectable without me rebasing.
>
> If you are OK with that, please let me know when you have submitted your
> queue.. I'll try to keep and eye open, but I might miss it...

The drivercore queue is now in Linus's tree.

Oh, you missed a kref_set() usage in the tree as well, you might want to
fix that up also.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/