xfs
[Top] [All Lists]

unwritten extent flag on linux

To: Linux-Xfs <linux-xfs@xxxxxxxxxxx>
Subject: unwritten extent flag on linux
From: "L. A. Walsh" <xfs@xxxxxxxxx>
Date: Tue, 17 Jan 2006 14:48:46 -0800
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
The mkfs.xfs manpage I have on my system talks about an unwritten
extent flag (all this talk about optimizing performance got me to
looking at what mkfs ops were considered optimal).  While the
7/2003 article didn't note a large difference in performance
on the kernel used at that time, I noted the manpage saying
about the "unwritten" option:

   "... If the suboption  is  omitted,  unwritten  extent
   flagging is enabled.  If unwritten extents are flagged, filesys-
   tem write performance will be negatively affected  for  preallo-
   cated  file  extents,  since  extra  filesystem transactions are
   required to convert extent flags for the range of the file writ-
   ten.   This suboption should be disabled if the filesystem needs
   to be used on operating system versions which do not support the
   flagging capability."

I.e flagging is enabled by default, but is bad for performance and
should be disabled on OS's that don't support the flagging capability.

Does linux support the 'flagging' capability?  Am sorta guessing
it does.

What does it mean for an OS to support the 'flagging' capability?
Guessing:

It's a way to "pre-journal" that space has been allocated but
not yet zeroed in case there is a system crash that happens
when xfs is allocating fresh file blocks (extents)
that might contain 'old data' (not zeroed yet).  This way
the flag gets set at allocation time that the blocks need to
be zeroed, so even if a crash happens before they are actually
zeroed, when the system recovers, those blocks are still
marked on disk as needing to be initialized -- which will be
done by an OS that supports the flagging capability.

In any event this appears to make disk extent allocation a
two step process to ensure the blocks are safely zeroed
before reuse (a requirement on a multi-level secure OS).
OS's that don't support the flag checking can disable
the flagging, as they won't bother to check the flag
on later access and zero it (perhaps return garbage or
sensitive information), but at least they might as
well turn off the flagging as it certainly provides
no benefit.

Is that the right idea or am I talking about something
completely different?

Thanks...
Linda



<Prev in Thread] Current Thread [Next in Thread>
  • unwritten extent flag on linux, L. A. Walsh <=