From: Dave Chinner <david@fromorbit.com>
To: p v <pvlogin@yahoo.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs@oss.sgi.com
Subject: Re: file preallocation without unwritten flag being set
Date: Thu, 14 May 2009 08:28:23 +1000 [thread overview]
Message-ID: <20090513222823.GL16929@discord.disaster> (raw)
In-Reply-To: <705795.15734.qm@web65604.mail.ac4.yahoo.com>
On Wed, May 13, 2009 at 02:05:16PM -0700, p v wrote:
>
> doesn't seem to work - I tried to clear the extflg in the
> versionnum of the superblock (in every copy of it as well) but it
> doesn't work. The flag is still set on all extents.
Sure - that xfs_db command only clears it from the superblock so
that *new* preallocations don't have the unwritten bit set. it
doesn't change existing allocations.
> And once I make the file xfs_repair complains and resets the sb
> flag - my guess is that in the extent allocation path it is
> hardcoded for the version 4.
More likely is that repair is seeing an existing unwritten extent
and setting the flag on the superblock.
> - any extent allocated beyond file size will get the flag .
Allocation beyond EOF does not use unwritten extents unless
it is preallocation.
> Also - 2 questions -
>
> 1) what is inode64 and where can I find out all of the
> undocumented mkfs/mount options (it's unfortunate that such a good
> fs doesnt' have a correspondingly good documentation)
All the options should be documented. Try 'man mkfs.xfs', 'man 8
mount' and Documentation/filesystems/xfs.txt
> 2) why is the largest extent size limited to xxx blocks
2^21 blocks. Limited to that because there are 21 bits for
the extent size in the on disk extent record.
> (can't find
> out thenumber - when does the inode get finally flushed? ls -i
> reports 19 as the inode number but even after unmounting inode 19
> in xfs_db still shows a free inode - is it still only in the
> log???)
Might be, or you are seeing stale cached block device data
(xfs_db operates in a different address space to a mounted
filesystem). Try dropping the page cache and then re-read.
> ? I assumed that xfs_bmap gets me the correct number of
> extents but now looking at the inode with xfs_db it's obvious that
> xfs_bmap reports contiguous ranges rather than actual extents in
> the blockmap tree.
Sure it does. You can tell how many extents a specific range is from
their maximum size (e.g. one extent per 8GB for a 4k block size
filesystem).
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-05-13 22:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 23:02 file preallocation without unwritten flag being set p v
2009-05-13 0:04 ` Eric Sandeen
2009-05-13 4:34 ` p v
2009-05-13 5:08 ` Eric Sandeen
2009-05-13 21:05 ` p v
2009-05-13 21:48 ` Eric Sandeen
2009-05-13 22:28 ` Dave Chinner [this message]
2009-05-13 23:51 ` p v
2009-05-14 0:17 ` Eric Sandeen
2009-05-14 0:34 ` Dave Chinner
2009-05-14 0:41 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090513222823.GL16929@discord.disaster \
--to=david@fromorbit.com \
--cc=pvlogin@yahoo.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox