Re: [PATCH 01/17] xfsprogs: use common code for multi-disk detection

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

 




----- Original Message -----
> From: "Brian Foster" <bfoster@xxxxxxxxxx>
> On Thu, Jul 02, 2015 at 08:47:53AM -0400, Jan Tulak wrote:
> >
> > When I look on the code, where did you got the 4 vs 5? In the old code, for
> > 512GB and bigger is assigned shift=5 directly. In the new one, shift is
> > set to XFS_MULTIDISK_AGLOG which is 5, and then, if the disk is smaller
> > than 512GB, it decrements the value. But unless I'm missing something, the
> > multidisk configuration is not changing anything, there is just a
> > different syntax.
> > 
> 
> I was referring to the multidisk case. The old code looks like this:
> 
>         if (!multidisk && dblocks >= MEGABYTES(128, blocklog)) {
> 		...
>         } else if (dblocks > GIGABYTES(512, blocklog))
>                 shift = 5;
>         else if (dblocks > GIGABYTES(8, blocklog))
>                 shift = 4;
> 
> ... which means if multidisk && dblocks == 512GB, then shift is set to
> 4. With the new code, we set XFS_MULTIDISK_AGLOG as you noted and then
> execute:
> 
> 	if (dblocks < GIGABYTES(512, blocklog))
> 		shift--;
> 	...
> 
> ... which will not decrement shift if dblocks == 512GB (i.e., shift is
> 5).
> 
> If you're still not convinced, create an exact sized 512GB file, mkfs it
> (with the su/sw options set for multidisk) with and without this change
> and observe agcount. :)
> 
> Brian
> 

Ah, mea culpa, I didn't thought about what happens when the size is exactly 512 GB when I wrote the reply. :-) You are right, I'll fix it.

Jan

-- 
Jan Tulak
jtulak@xxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



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

  Powered by Linux