xfs
[Top] [All Lists]

Re: What is a recommended XFS sector size for hybrid (512e) advanced for

To: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
Subject: Re: What is a recommended XFS sector size for hybrid (512e) advanced format hard drives?
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 06 Jan 2015 23:31:44 -0600
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CAJCQCtS8M5w76bzr4TzB9CQo+tTOwsfAu8+x5h7p9W_RMfEgFA@xxxxxxxxxxxxxx>
References: <1806495.BCZcrVVEOf@shtub-cm> <54AC1511.1060908@xxxxxxxxxxx> <CAJCQCtQqseJ_75WSjqqNMmSjYW-0-L_cWBDDECRVOkiTmHLeVA@xxxxxxxxxxxxxx> <54AC363E.1090109@xxxxxxxxxxx> <CAJCQCtRUq9ozu74TBjm4G-yoC0kQa7Vr8nUTNzke6O7DTWQPXw@xxxxxxxxxxxxxx> <CAJCQCtS8M5w76bzr4TzB9CQo+tTOwsfAu8+x5h7p9W_RMfEgFA@xxxxxxxxxxxxxx>
On 1/6/15 1:55 PM, Chris Murphy wrote:
> What's sectsz= used for? Historically this would be sectsz=512,
> bsize=4096 before AF hard drives appeared. So is sectsz used for
> optimizing sub blocksize changes? e.g. if only 50 bytes needs
> changing, the fs doesn't need to read modify and write the entire 4096
> block, just change the affected sector?

Nope, filesystem data blocks are always fully written, but the sector
size is i.e. the minimum _log_ IO size.

+/*
+ * The xfs_buftarg contains 2 notions of "sector size" -
+ *
+ * 1) The metadata sector size, which is the minimum unit and
+ *    alignment of IO which will be performed by metadata operations.
+ * 2) The device logical sector size
+ *
+ * The first is specified at mkfs time, and is stored on-disk in the
+ * superblock's sb_sectsize.
+ *
+ * The latter is derived from the underlying device, and controls direct IO
+ * alignment constraints.

-Eric

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