Re: [PATCH] xfsprogs: mkfs: don't default to the physical sector size if it's bigger than XFS_MAX_SECTORSIZE

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

 



"Darrick J. Wong" <darrick.wong@xxxxxxxxxx> writes:

> On Tue, Jan 28, 2020 at 11:07:01AM -0500, Jeff Moyer wrote:
>> Hi,
>> 
>> In testing on ppc64, I ran into the following error when making a file
>> system:
>> 
>> # ./mkfs.xfs -b size=65536 -f /dev/ram0
>> illegal sector size 65536
>> 
>> Which is odd, because I didn't specify a sector size!  The problem is
>> that validate_sectorsize defaults to the physical sector size, but in
>> this case, the physical sector size is bigger than XFS_MAX_SECTORSIZE.
>> 
>> # cat /sys/block/ram0/queue/physical_block_size 
>> 65536
>> 
>> Fall back to the default (logical sector size) if the physical sector
>> size is greater than XFS_MAX_SECTORSIZE.
>
> Do we need to check that ft->lsectorsize <= XFS_MAX_SECTORSIZE too?

Actually, that's done later in the same function:

        /* validate specified/probed sector size */
        if (cfg->sectorsize < XFS_MIN_SECTORSIZE ||
            cfg->sectorsize > XFS_MAX_SECTORSIZE) {
                fprintf(stderr, _("illegal sector size %d\n"), cfg->sectorsize);
                usage();
        }

-Jeff




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux