]> www.infradead.org Git - users/hch/xfsprogs.git/commit
db: introduce verifier support into set_cur
authorDave Chinner <dchinner@redhat.com>
Wed, 13 Nov 2013 06:40:45 +0000 (06:40 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 13 Nov 2013 17:12:20 +0000 (11:12 -0600)
commit6fea8f830a6cc04d5429de31f40d15b94d0fe8da
treed2211c78dd8cd522dd12faa1ce61faad2382aff0
parent72298d16b17776f7a57a5244776591653387846b
db: introduce verifier support into set_cur

To be able to use read and write verifiers, we need to pass the
verifier to the IO routines. We do this via the set_cur() function
used to trigger reading the buffer.

For most metadata types, there is only one type of verifier needed.
For these, we can simply add the verifier to the type table entry
for the given type and use that directly. This type entry is already
carried around by the IO context, so if we ever need to get it again
we have direct access to it in the context we'll be doing IO.

Only attach the verifiers to the v5 filesystem type table; there is
not need for them on v4 filesystems as we don't have to verify or
calculate CRCs for them.

There are some metadata types that have more than one buffer format,
or aren't based in directly in buffers. For these, leave the type
table verifier NULL for now - these will need to be addressed
individually.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
db/io.c
db/type.c
db/type.h