This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "XFS development tree".
The branch, master has been updated
e721f50 xfs: implement extended feature masks
04a1e6c xfs: add CRC checks to the superblock
61fe135 xfs: buffer type overruns blf_flags field
d75afeb xfs: add buffer types to directory and attribute buffers
d2e448d xfs: add CRC protection to remote attributes
95920cd xfs: split remote attribute code out
517c222 xfs: add CRCs to attr leaf blocks
f5ea110 xfs: add CRCs to dir2/da node blocks
6b2647a xfs: shortform directory offsets change for dir3 format
24df33b xfs: add CRC checking to dir2 leaf blocks
33363fe xfs: add CRC checking to dir2 data blocks
cbc8adf xfs: add CRC checking to dir2 free blocks
f5f3d9b xfs: add CRC checks to block format directory blocks
f948dd7 xfs: add CRC checks to remote symlinks
19de735 xfs: split out symlink code into it's own file.
93848a9 xfs: add version 3 inode format with CRCs
3fe58f3 xfs: add CRC checks for quota blocks
983d09f xfs: add CRC checks to the AGI
77c95bb xfs: add CRC checks to the AGFL
4e0e604 xfs: add CRC checks to the AGF
ee1a47a xfs: add support for large btree blocks
a205064 xfs: increase hexdump output in xfs_corruption_error
from 7fe3258c50de383037102129c57df5cb66ab2000 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e721f504cf46a0c84741ba2137d7a052d79436db
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:32 2013 +1100
xfs: implement extended feature masks
The version 5 superblock has extended feature masks for compatible,
incompatible and read-only compatible feature sets. Implement the
masking and mount-time checking for these feature masks.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 04a1e6c5b222b089c6960dfc5352002002a4355f
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:31 2013 +1100
xfs: add CRC checks to the superblock
With the addition of CRCs, there is such a wide and varied change to
the on disk format that it makes sense to bump the superblock
version number rather than try to use feature bits for all the new
functionality.
This commit introduces all the new superblock fields needed for all
the new functionality: feature masks similar to ext4, separate
project quota inodes, a LSN field for recovery and the CRC field.
This commit does not bump the superblock version number, however.
That will be done as a separate commit at the end of the series
after all the new functionality is present so we switch it all on in
one commit. This means that we can slowly introduce the changes
without them being active and hence maintain bisectability of the
tree.
This patch is based on a patch originally written by myself back
from SGI days, which was subsequently modified by Christoph Hellwig.
There is relatively little of that patch remaining, but the history
of the patch still should be acknowledged here.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 61fe135c1dde112f483bba01d645debd881b5428
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:30 2013 +1100
xfs: buffer type overruns blf_flags field
The buffer type passed to log recvoery in the buffer log item
overruns the blf_flags field. I had assumed that flags field was a
32 bit value, and it turns out it is a unisgned short. Therefore
having 19 flags doesn't really work.
Convert the buffer type field to numeric value, and use the top 5
bits of the flags field for it. We currently have 17 types of
buffers, so using 5 bits gives us plenty of room for expansion in
future....
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit d75afeb3d302019527331520a2632b6614425b40
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:29 2013 +1100
xfs: add buffer types to directory and attribute buffers
Add buffer types to the buffer log items so that log recovery can
validate the buffers and calculate CRCs correctly after the buffers
are recovered.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit d2e448d5fdebdcda93ed171339a3d864f65c227e
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:28 2013 +1100
xfs: add CRC protection to remote attributes
There are two ways of doing this - the first is to add a CRC to the
remote attribute entry in the attribute block. The second is to
treat them similar to the remote symlink, where each fragment has
it's own header and identifies fragment location in the attribute.
The problem with the CRC in the remote attr entry is that we cannot
identify the owner of the metadata from the metadata blocks
themselves, or where the blocks fit into the remote attribute. The
down side to this approach is that we never know when the attribute
has been read from disk or not and so we have to verify it every
time it is read, and we must calculate it during the create
transaction and log it. We do not log CRCs for any other metadata,
and so this creates a unique set of coherency problems that, in
general, are best avoided.
Adding an identifying header to each allocated block allows us to
identify each fragment and where in the attribute it is located. It
enables us to rebuild the remote attribute from just the raw blocks
containing the attribute. It also provides us to do per-block CRCs
verification at IO time rather than during the transaction context
that creates it or every time it is read into a user buffer. Hence
it avoids all the problems that an external, logged CRC has, and
provides all the benefits of self identifying metadata.
The only complexity is that we have to add a header per fragment,
and we don't know how many fragments will be needed prior to
allocations. If we take the symlink example, the header is 56 bytes
and hence for a 4k block size filesystem, in the worst case 16
headers requires 1 extra block for the 64k attribute data. For 512
byte filesystems the worst case is an extra block for every 9
fragments (i.e. 16 extra blocks in the worse case). This will be
very rare and so it's not really a major concern.
Because allocation is done in two steps - the first finds a hole
large enough in the attribute file, the second does the allocation -
we only need to find a hole big enough for a worst case allocation.
We only need to allocate enough extra blocks for number of headers
required by the fragments, and we can calculate that as we go....
Hence it really only makes sense to use the same model as for
symlinks - it doesn't add that much complexity, does not require an
attribute tree format change, and does not require logging
calculated CRC values.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 95920cd6ce1c9cd8d3a0f639a674aa26c974ed57
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:27 2013 +1100
xfs: split remote attribute code out
Adding CRC support to remote attributes adds a significant amount of
remote attribute specific code. Split the existing remote attribute
code out into it's own file so that all the relevant remote
attribute code is in a single, easy to find place.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 517c22207b045993a6529e1f8684095adaae9cf3
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 24 18:58:55 2013 +1000
xfs: add CRCs to attr leaf blocks
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit f5ea110044fa858925a880b4fa9f551bfa2dfc38
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 24 18:58:02 2013 +1000
xfs: add CRCs to dir2/da node blocks
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 6b2647a12a00bdad431ac1e9049c5e8579aa7869
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:24 2013 +1100
xfs: shortform directory offsets change for dir3 format
Because the header size for the CRC enabled directory blocks is
larger, the offset of the first entry into a directory block is
different to the dir2 format. The shortform directory stores the
dirent's offset so that it doesn't change when moving from shortform
to block form and back again, and hence it needs to take into
account the different header sizes to maintain the correct offsets.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 24df33b45ecf5ca413ef1530e0aca5506d9be2cc
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Fri Apr 12 07:30:21 2013 +1000
xfs: add CRC checking to dir2 leaf blocks
This addition follows the same pattern as the dir2 block CRCs.
Seeing as both LEAF1 and LEAFN types need to changed at the same
time, this is a pretty large amount of change. leaf block headers
need to be abstracted away from the on-disk structures (struct
xfs_dir3_icleaf_hdr), as do the base leaf entry locations.
This header abstract allows the in-core header and leaf entry
location to be passed around instead of the leaf block itself. This
saves a lot of converting individual variables from on-disk format
to host format where they are used, so there's a good chance that
the compiler will be able to produce much more optimal code as it's
not having to byteswap variables all over the place.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 33363feed1614def83d0a6870051f0a7828cd61b
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:22 2013 +1100
xfs: add CRC checking to dir2 data blocks
This addition follows the same pattern as the dir2 block CRCs.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit cbc8adf89724b961c08b823d8bfb6dadbfa8733d
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:21 2013 +1100
xfs: add CRC checking to dir2 free blocks
This addition follows the same pattern as the dir2 block CRCs, but
with a few differences. The main difference is that the free block
header is different between the v2 and v3 formats, so an "in-core"
free block header has been added and _todisk/_from_disk functions
used to abstract the differences in structure format from the code.
This is similar to the on-disk superblock versus the in-core
superblock setup. The in-core strucutre is populated when the buffer
is read from disk, all the in memory checks and modifications are
done on the in-core version of the structure which is written back
to the buffer before the buffer is logged.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit f5f3d9b0161633e8943520e83df634ad540b3b7f
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:20 2013 +1100
xfs: add CRC checks to block format directory blocks
Now that directory buffers are made from a single struct xfs_buf, we
can add CRC calculation and checking callbacks. While there, add all
the fields to the on disk structures for future functionality such
as d_type support, uuids, block numbers, owner inode, etc.
To distinguish between the different on disk formats, change the
magic numbers for the new format directory blocks.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit f948dd76dde021c050c7c35720dc066a8b9a5e35
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:19 2013 +1100
xfs: add CRC checks to remote symlinks
Add a header to the remote symlink block, containing location and
owner information, as well as CRCs and LSN fields. This requires
verifiers to be added to the remote symlink buffers for CRC enabled
filesystems.
This also fixes a bug reading multiple block symlinks, where the second
block overwrites the first block when copying out the link name.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 19de7351a8eb82dc99745e60e8f43474831d99c7
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:18 2013 +1100
xfs: split out symlink code into it's own file.
The symlink code is about to get more complicated when CRCs are
added for remote symlink blocks. The symlink management code is
mostly self contained, so move it to it's own files so that all the
new code and the existing symlink code will not be intermingled
with other unrelated code.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 93848a999cf9b9e4f4f77dba843a48c393f33c59
Author: Christoph Hellwig <hch@xxxxxx>
Date: Wed Apr 3 16:11:17 2013 +1100
xfs: add version 3 inode format with CRCs
Add a new inode version with a larger core. The primary objective is
to allow for a crc of the inode, and location information (uuid and ino)
to verify it was written in the right place. We also extend it by:
a creation time (for Samba);
a changecount (for NFSv4);
a flush sequence (in LSN format for recovery);
an additional inode flags field; and
some additional padding.
These additional fields are not implemented yet, but already laid
out in the structure.
[dchinner@xxxxxxxxxx] Added LSN and flags field, some factoring and rework
to
capture all the necessary information in the crc calculation.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00
Author: Christoph Hellwig <hch@xxxxxx>
Date: Wed Apr 3 16:11:16 2013 +1100
xfs: add CRC checks for quota blocks
Use the reserved space in struct xfs_dqblk to store a UUID and a crc
for the quota blocks.
[dchinner@xxxxxxxxxx] Add a LSN field and update for current verifier
infrastructure.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 983d09ffe396ed5d5339a1b9ff994dd0b0f2069f
Author: Dave Chinner <dgc@xxxxxxx>
Date: Wed Apr 3 16:11:15 2013 +1100
xfs: add CRC checks to the AGI
Same set of changes made to the AGF need to be made to the AGI.
This patch has a similar history to the AGF, hence a similar
sign-off chain.
Signed-off-by: Dave Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dgc@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 77c95bba013089fa868217283eb6d98a05913e53
Author: Christoph Hellwig <hch@xxxxxx>
Date: Wed Apr 3 16:11:14 2013 +1100
xfs: add CRC checks to the AGFL
Add CRC checks, location information and a magic number to the AGFL.
Previously the AGFL was just a block containing nothing but the
free block pointers. The new AGFL has a real header with the usual
boilerplate instead, so that we can verify it's not corrupted and
written into the right place.
[dchinner@xxxxxxxxxx] Added LSN field, reworked significantly to fit
into new verifier structure and growfs structure, enabled full
verifier functionality now there is a header to verify and we can
guarantee an initialised AGFL.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit 4e0e6040c4052aff15a494ac05778f4086d24c33
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:13 2013 +1100
xfs: add CRC checks to the AGF
The AGF already has some self identifying fields (e.g. the sequence
number) so we only need to add the uuid to it to identify the
filesystem it belongs to. The location is fixed based on the
sequence number, so there's no need to add a block number, either.
Hence the only additional fields are the CRC and LSN fields. These
are unlogged, so place some space between the end of the logged
fields and them so that future expansion of the AGF for logged
fields can be placed adjacent to the existing logged fields and
hence not complicate the field-derived range based logging we
currently have.
Based originally on a patch from myself, modified further by
Christoph Hellwig and then modified again to fit into the
verifier structure with additional fields by myself. The multiple
signed-off-by tags indicate the age and history of this patch.
Signed-off-by: Dave Chinner <dgc@xxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit ee1a47ab0e77600fcbdf1c87d461bd8f3f63150d
Author: Christoph Hellwig <hch@xxxxxx>
Date: Sun Apr 21 14:53:46 2013 -0500
xfs: add support for large btree blocks
Add support for larger btree blocks that contains a CRC32C checksum,
a filesystem uuid and block number for detecting filesystem
consistency and out of place writes.
[dchinner@xxxxxxxxxx] Also include an owner field to allow reverse
mappings to be implemented for improved repairability and a LSN
field to so that log recovery can easily determine the last
modification that made it to disk for each buffer.
[dchinner@xxxxxxxxxx] Add buffer log format flags to indicate the
type of buffer to recovery so that we don't have to do blind magic
number tests to determine what the buffer is.
[dchinner@xxxxxxxxxx] Modified to fit into the verifier structure.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
commit a2050646f655a90400cbb66c3866d2e0137eee0c
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date: Wed Apr 3 16:11:11 2013 +1100
xfs: increase hexdump output in xfs_corruption_error
Currently xfs_corruption_error() dumps the first 16 bytes of the
buffer that is passed to it when a corruption occurs. This is not
large enough to see the entire state of the header of the block that
was determined to be corrupt. increase the output to 64 bytes to
capture the majority of all headers in all types of metadata blocks.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Ben Myers <bpm@xxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>
-----------------------------------------------------------------------
Summary of changes:
fs/xfs/Makefile | 6 +-
fs/xfs/xfs_ag.h | 56 +-
fs/xfs/xfs_alloc.c | 199 +++--
fs/xfs/xfs_alloc_btree.c | 105 ++-
fs/xfs/xfs_alloc_btree.h | 12 +-
fs/xfs/xfs_attr.c | 454 +++---------
fs/xfs/xfs_attr.h | 1 -
fs/xfs/xfs_attr_leaf.c | 1775 ++++++++++++++++++++++++++-------------------
fs/xfs/xfs_attr_leaf.h | 122 +++-
fs/xfs/xfs_attr_remote.c | 550 ++++++++++++++
fs/xfs/xfs_attr_remote.h | 46 ++
fs/xfs/xfs_bmap.c | 67 +-
fs/xfs/xfs_bmap_btree.c | 110 ++-
fs/xfs/xfs_bmap_btree.h | 19 +-
fs/xfs/xfs_btree.c | 256 +++++--
fs/xfs/xfs_btree.h | 64 +-
fs/xfs/xfs_buf_item.h | 64 +-
fs/xfs/xfs_da_btree.c | 1501 +++++++++++++++++++++++---------------
fs/xfs/xfs_da_btree.h | 130 +++-
fs/xfs/xfs_dinode.h | 37 +-
fs/xfs/xfs_dir2_block.c | 179 +++--
fs/xfs/xfs_dir2_data.c | 266 ++++---
fs/xfs/xfs_dir2_format.h | 278 ++++++-
fs/xfs/xfs_dir2_leaf.c | 898 ++++++++++++++---------
fs/xfs/xfs_dir2_node.c | 1007 +++++++++++++++----------
fs/xfs/xfs_dir2_priv.h | 50 +-
fs/xfs/xfs_dir2_sf.c | 12 +-
fs/xfs/xfs_dquot.c | 112 ++-
fs/xfs/xfs_error.c | 2 +-
fs/xfs/xfs_file.c | 2 +-
fs/xfs/xfs_fsops.c | 34 +-
fs/xfs/xfs_ialloc.c | 107 ++-
fs/xfs/xfs_ialloc_btree.c | 87 ++-
fs/xfs/xfs_ialloc_btree.h | 9 +-
fs/xfs/xfs_inode.c | 212 ++++--
fs/xfs/xfs_inode.h | 26 +
fs/xfs/xfs_inode_item.c | 2 +-
fs/xfs/xfs_log_recover.c | 240 +++++-
fs/xfs/xfs_mount.c | 146 +++-
fs/xfs/xfs_mount.h | 1 +
fs/xfs/xfs_qm.c | 23 +-
fs/xfs/xfs_qm.h | 2 +
fs/xfs/xfs_quota.h | 11 +-
fs/xfs/xfs_sb.h | 166 ++++-
fs/xfs/xfs_symlink.c | 730 +++++++++++++++++++
fs/xfs/xfs_symlink.h | 66 ++
fs/xfs/xfs_trace.c | 2 +-
fs/xfs/xfs_trans_buf.c | 63 +-
fs/xfs/xfs_vnodeops.c | 478 +-----------
49 files changed, 7223 insertions(+), 3562 deletions(-)
create mode 100644 fs/xfs/xfs_attr_remote.c
create mode 100644 fs/xfs/xfs_attr_remote.h
create mode 100644 fs/xfs/xfs_symlink.c
create mode 100644 fs/xfs/xfs_symlink.h
hooks/post-receive
--
XFS development tree
|