Re: [PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing stripe boundary

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

 



On Sat, Jul 25, 2015 at 09:18:54AM +0800, Qu Wenruo wrote:
> > This caught my attention and looking at possible values of num_bytes,
> > this can crash:
> >
> > 1291         for (last_byte = 0; last_byte < first_free; last_byte += sectorsize) {
> > 1292                 ret = custom_alloc_extent(root, sectorsize, 0, &key, 0);
> >
> > where sectorsize == num_bytes.
> For that case, the last 0 means that's a data block,
> and won't comes to the BUG_ON, as it is only designed for metadata.
> And for metadata allocation, the size will only be nodes/leafsize

Right, so it's an asseert in disguise. Applied, thanks.
--
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