* [PATCH] Btrfs: fix wrong uevent target
@ 2014-07-02 9:03 Miao Xie
2014-07-03 11:09 ` Miao Xie
0 siblings, 1 reply; 6+ messages in thread
From: Miao Xie @ 2014-07-02 9:03 UTC (permalink / raw)
To: linux-btrfs
block_device's bd_disk points to the disk, not the object which block_device
is actually corresponding to(the whole disk or a partition), so we would send
uevent to the wrong target. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 95828b0..e8b9214 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -123,7 +123,7 @@ static void btrfs_kobject_uevent(struct block_device *bdev,
{
int ret;
- ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action);
+ ret = kobject_uevent(&part_to_dev(bdev->bd_part)->kobj, action);
if (ret)
pr_warn("BTRFS: Sending event '%d' to kobject: '%s' (%p): failed\n",
action,
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs: fix wrong uevent target
2014-07-02 9:03 [PATCH] Btrfs: fix wrong uevent target Miao Xie
@ 2014-07-03 11:09 ` Miao Xie
2014-07-03 14:00 ` Chris Mason
0 siblings, 1 reply; 6+ messages in thread
From: Miao Xie @ 2014-07-03 11:09 UTC (permalink / raw)
To: linux-btrfs; +Cc: Anand Jain
CC Anand Jain
Sorry, please ignore this patch.
Anand wrote the same patch several days ago, so this bug fix belongs to Anand
though he NACKed his patch at that time.
Thanks
Miao
On Wed, 2 Jul 2014 17:03:54 +0800, Miao Xie wrote:
> block_device's bd_disk points to the disk, not the object which block_device
> is actually corresponding to(the whole disk or a partition), so we would send
> uevent to the wrong target. Fix it.
>
> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
> ---
> fs/btrfs/volumes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 95828b0..e8b9214 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -123,7 +123,7 @@ static void btrfs_kobject_uevent(struct block_device *bdev,
> {
> int ret;
>
> - ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action);
> + ret = kobject_uevent(&part_to_dev(bdev->bd_part)->kobj, action);
> if (ret)
> pr_warn("BTRFS: Sending event '%d' to kobject: '%s' (%p): failed\n",
> action,
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs: fix wrong uevent target
2014-07-03 11:09 ` Miao Xie
@ 2014-07-03 14:00 ` Chris Mason
2014-07-03 17:32 ` Anand Jain
0 siblings, 1 reply; 6+ messages in thread
From: Chris Mason @ 2014-07-03 14:00 UTC (permalink / raw)
To: Miao Xie, linux-btrfs; +Cc: Anand Jain
On 07/03/2014 07:09 AM, Miao Xie wrote:
> CC Anand Jain
>
> Sorry, please ignore this patch.
> Anand wrote the same patch several days ago, so this bug fix belongs to Anand
> though he NACKed his patch at that time.
It certainly looks right, but Anand had mentioned that he had a few
questions on testing. I've pulled it out for now, but I'll take Anand's
version when you're both happy.
-chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs: fix wrong uevent target
2014-07-03 14:00 ` Chris Mason
@ 2014-07-03 17:32 ` Anand Jain
2014-07-04 1:58 ` Qu Wenruo
2014-07-04 4:18 ` Miao Xie
0 siblings, 2 replies; 6+ messages in thread
From: Anand Jain @ 2014-07-03 17:32 UTC (permalink / raw)
To: Chris Mason; +Cc: Miao Xie, linux-btrfs
Chris,
This fix is theoretically correct but my guess that this would
solve problem as reported by Qu Wenruo was wrong [1].
Patch is good to integrate.
Thanks, Anand
[1] Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device
add/remove.
On 03/07/2014 22:00, Chris Mason wrote:
> On 07/03/2014 07:09 AM, Miao Xie wrote:
>> CC Anand Jain
>>
>> Sorry, please ignore this patch.
>> Anand wrote the same patch several days ago, so this bug fix belongs to Anand
>> though he NACKed his patch at that time.
>
> It certainly looks right, but Anand had mentioned that he had a few
> questions on testing. I've pulled it out for now, but I'll take Anand's
> version when you're both happy.
>
> -chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs: fix wrong uevent target
2014-07-03 17:32 ` Anand Jain
@ 2014-07-04 1:58 ` Qu Wenruo
2014-07-04 4:18 ` Miao Xie
1 sibling, 0 replies; 6+ messages in thread
From: Qu Wenruo @ 2014-07-04 1:58 UTC (permalink / raw)
To: Anand Jain, Chris Mason; +Cc: Miao Xie, linux-btrfs
-------- Original Message --------
Subject: Re: [PATCH] Btrfs: fix wrong uevent target
From: Anand Jain <anand.jain@oracle.com>
To: Chris Mason <clm@fb.com>
Date: 2014年07月04日 01:32
> Chris,
>
> This fix is theoretically correct but my guess that this would
> solve problem as reported by Qu Wenruo was wrong [1].
> Patch is good to integrate.
>
> Thanks, Anand
>
> [1] Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device
> add/remove.
Yes, whatever uevent improvement will not solve the problem of 'btrfs
dev scan; btrfs dev del; btrfs dev scan'.
Since uevent event is send from kernel and received by ueventd, then
ueventd goes to update the device file ctime/mtine.
The uevent procedure is always asynchronized, so it will not fix the
'btrfs dev scan' libblkid cache problem.
Althogh my RFC patch is ugly, it will provide a synchronzied method to
update ctime/mtime from kernel.
Thank,
Qu
>
>
> On 03/07/2014 22:00, Chris Mason wrote:
>> On 07/03/2014 07:09 AM, Miao Xie wrote:
>>> CC Anand Jain
>>>
>>> Sorry, please ignore this patch.
>>> Anand wrote the same patch several days ago, so this bug fix belongs
>>> to Anand
>>> though he NACKed his patch at that time.
>>
>> It certainly looks right, but Anand had mentioned that he had a few
>> questions on testing. I've pulled it out for now, but I'll take Anand's
>> version when you're both happy.
>>
>> -chris
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs: fix wrong uevent target
2014-07-03 17:32 ` Anand Jain
2014-07-04 1:58 ` Qu Wenruo
@ 2014-07-04 4:18 ` Miao Xie
1 sibling, 0 replies; 6+ messages in thread
From: Miao Xie @ 2014-07-04 4:18 UTC (permalink / raw)
To: Anand Jain, Chris Mason; +Cc: linux-btrfs
On Fri, 4 Jul 2014 01:32:11 +0800, Anand Jain wrote:
> Chris,
>
> This fix is theoretically correct but my guess that this would
> solve problem as reported by Qu Wenruo was wrong [1].
> Patch is good to integrate.
>
> Thanks, Anand
>
> [1] Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove.
I have merged this patch(just change the changelog) and other important bug fix patches
into my tree to make it easier to be merged into Chris's for-linus branch. The URL is
https://github.com/miaoxie/linux-btrfs.git for-3.16-rcX
But because there are some old patches in the current for-linus branch, if someone want to
merge my branch to for-linus, he/she must reset for-linus branch to
commit 2aa06a35d06a34b3109bdbf1d653de1695dc8f12
Author: Eric Sandeen <sandeen@redhat.com>
Date: Fri Jun 27 16:50:31 2014 -0500
btrfs: fix nossd and ssd_spread mount option regression
then can pull my branch and merge it into for-linus branch directly.
Thanks
Miao
> On 03/07/2014 22:00, Chris Mason wrote:
>> On 07/03/2014 07:09 AM, Miao Xie wrote:
>>> CC Anand Jain
>>>
>>> Sorry, please ignore this patch.
>>> Anand wrote the same patch several days ago, so this bug fix belongs to Anand
>>> though he NACKed his patch at that time.
>>
>> It certainly looks right, but Anand had mentioned that he had a few
>> questions on testing. I've pulled it out for now, but I'll take Anand's
>> version when you're both happy.
>>
>> -chris
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-04 4:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02 9:03 [PATCH] Btrfs: fix wrong uevent target Miao Xie
2014-07-03 11:09 ` Miao Xie
2014-07-03 14:00 ` Chris Mason
2014-07-03 17:32 ` Anand Jain
2014-07-04 1:58 ` Qu Wenruo
2014-07-04 4:18 ` Miao Xie
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).