Re: [PATCH V5] Btrfs: snapshot-aware defrag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 18, 2013 at 6:19 AM, David Sterba <dsterba@xxxxxxx> wrote:
> On Thu, Jan 17, 2013 at 08:42:46AM -0600, Mitch Harder wrote:
>> [16028.160002] RAX: dead000000200200 RBX: ffff880000000000 RCX: 0000000000018e20
>> [16028.160002] RDX: dead000000100100 RSI: 000000000000001b RDI: 000000000000001b
>
> RAX: dead000000200200
> RDX: dead000000100100
>
> list_head poisons to mark deleted entries
>
>> I've tried to trap the error with a BUG_ON prior to deleting the list,
>> but my attempt isn't catching the error:
>>
>> @@ -1769,6 +1769,7 @@ int btrfs_clean_old_snapshots(struct btrfs_root *root)
>>                 int ret;
>>
>>                 root = list_entry(list.next, struct btrfs_root, root_list);
>> +               BUG_ON(&root->root_list == NULL);
>
> You're taking an address and comparing it to NULL? This works, but in
> under very limited conditions :)
>
> If root is not null, then the structure is valid, but the root_list hook
> is not valid anymore, ie. an inconsistency.

Thanks, your feedback is kind.

I wasn't thinking when I wrote that.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux