Re: [PATCH]Btrfs:Fix discard semantic

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

 



On Thu, 2009-07-09 at 23:57 +0100, David Woodhouse wrote:
> On Sat, 2009-01-03 at 23:33 +0800, Liu Hui wrote:
> > +       /* Tell the block device(s) that the sectors can be discarded */
> > +       ret = btrfs_map_block(&root->fs_info->mapping_tree, READ,
> > +                             bytenr, &map_length, &multi, 0);
> 
> Shouldn't that READ be a WRITE, if we want to discard every stripe of a
> RAID1 rather than only one of them?

Actually it's more broken than that -- it will only discard the first
stripe_len of the extent. For any kind of RAID, including RAID0, we need
to loop over the btrfs_map_block() call.

I'll fix that too...

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@xxxxxxxxx                              Intel Corporation

--
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