[Top] [All Lists]

Re: [RFC PATCH 2/2] xfs: sysfs attributes for the current log state

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [RFC PATCH 2/2] xfs: sysfs attributes for the current log state
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 20 May 2014 07:56:58 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1400263966-35541-3-git-send-email-bfoster@xxxxxxxxxx>
References: <1400263966-35541-1-git-send-email-bfoster@xxxxxxxxxx> <1400263966-35541-3-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, May 16, 2014 at 02:12:46PM -0400, Brian Foster wrote:
> Create sysfs attributes to export the current runtime state of the log
> to userspace. Note that the filesystem should be frozen for best
> accuracy/consistency when reading these values, but is not required.
> This is for testing and debug purposes only.
> Create the following per-mount attributes: log_head_lsn, log_tail_lsn,
> reserve_head_lsn and write_head_lsn. These represent the physical log

Reserve and write heads are not log sequence numbers (LSNs). A LSN
is a cycle:block count tuple, while a grant head is a cycle:byte
count tuple....

Calling the reserve_grant_head/write_grant_head would make more
sense, I think, as would splitting them into cycle/byte output
pairs. Splitting them make sense because if we increase the log size
beyond 2GB we're going to need a different in-memory representation
for the grant heads (i.e. need more than 32 bits for byte count), so
we should probably handle that up front in the sysfs API...


Dave Chinner

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