xfs
[Top] [All Lists]

[REVIEW] Fix end of device zeroing with > 1K sector sizes

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Subject: [REVIEW] Fix end of device zeroing with > 1K sector sizes
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Fri, 22 Feb 2008 14:56:20 +1100
Organization: SGI
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
It has been found that mkfs with big sector sizes and devices/partitions
that aren't aligned to the sector size can cause short writes when zeroing
the end of the device. As mkfs.xfs didn't complete, the filesystem is
unmountable.

Eg:

# mkfs.xfs -f -L fs_1 -s size=4096 -l size=64m,sunit=512 /dev/hdd1
mkfs.xfs: error - wrote only 130048 of 131072 bytes


The attached patch rounds down the device size to either 1K or the sector size, whichever is greater.

Barry.

Attachment: fix_eodev_zeroing.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>