Commit Graph

80 Commits

Author SHA1 Message Date
Zach Brown
f649edd65d scoutfs-utils: add block count corruption
Signed-off-by: Zach Brown <zab@versity.com>
2018-06-29 14:42:08 -07:00
Zach Brown
37d5aae4d2 scoutfs-utils: add corruption messages
Update the format header and add a man page which describes the
corruption messages that the kernel module can spit out.

Signed-off-by: Zach Brown <zab@versity.com>
2018-04-27 09:06:40 -07:00
Zach Brown
f275020baa scoutfs-utils: update btree constants
Signed-off-by: Zach Brown <zab@versity.com>
2018-04-13 08:59:06 -07:00
Zach Brown
8e6c18a0fa scoutfs-utils: support small keys
Make the changes to support the new small key struct.  mkfs and print
work with simpler keys, segment items, and manifest entries.  The item
cache keys ioctl now just needs to work with arrays of keys.

Signed-off-by: Zach Brown <zab@versity.com>
2018-04-04 09:15:54 -05:00
Zach Brown
0770cc8c57 scoutfs-utils: support single dirent format
Signed-off-by: Zach Brown <zab@versity.com>
2018-04-04 09:15:54 -05:00
Zach Brown
8119a56c92 scoutfs-utils: update format for xattr cleanups
xattr items are now stored at the hash of the name and have a header in
the first part.

Signed-off-by: Zach Brown <zab@versity.com>
2018-03-15 09:23:53 -07:00
Zach Brown
2527b4906e scoutfs-utils: remove inode blocks field
It's the sum of oneline and offline and is redundant.

Signed-off-by: Zach Brown <zab@versity.com>
2018-02-21 09:36:49 -08:00
Zach Brown
d796fbf15e scoutfs: track online and offline blocks
Signed-off-by: Zach Brown <zab@versity.com>
2018-02-21 09:36:49 -08:00
Zach Brown
7d674fa4bf scoutfs-utils: remove size inode index items
With the removal of the size index items we no longer have to print them
or be able to walk the index.  mkfs only needs to create a meta seq
index item for the root inode.

Signed-off-by: Zach Brown <zab@versity.com>
2018-01-30 15:03:50 -08:00
Mark Fasheh
7c30294e1b scoutfs-utils: update format.h with file handle definition
Signed-off-by: Mark Fasheh <mfasheh@versity.com>
2018-01-26 12:03:09 -08:00
Zach Brown
33fa14b730 scoutfs: remove SCOUTFS_LOCK_INODE_GROUP_OFFSET
This is an unused artifact from a previous key format.

Signed-off-by: Zach Brown <zab@versity.com>
2017-12-08 12:18:57 -06:00
Zach Brown
0876fb31c6 scoutfs-utils: remove btree item bit augmentation
We no longer need the complexity of augmenting the btree to find items
with bits set.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-26 14:48:14 -07:00
Zach Brown
80e0c4bd56 scoutfs-utils: add support for btree migration key
Signed-off-by: Zach Brown <zab@versity.com>
2017-10-26 14:48:14 -07:00
Mark Fasheh
0acab247e3 scoutfs-utils: update scoutfs_inode definition
We need the flags field from -kmod.

Signed-off-by: Mark Fasheh <mfasheh@versity.com>
2017-10-18 13:23:06 -07:00
Zach Brown
4ab22d8f09 scoutfs-utils: update format for net greeting
Signed-off-by: Zach Brown <zab@versity.com>
2017-10-12 13:58:11 -07:00
Zach Brown
b3d11925c7 scoutfs-utils: add support for format_hash
Calculate the hash of format.h and ioctl.h, put it in the super during
mkfs, and print it out.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-12 13:58:11 -07:00
Zach Brown
34fc095392 scoutfs-utils: update btree ring calc
Update the calculation of the largest number of btree blocks based on
the format.h update that provides the min free space in parent blocks
instead of the free limit for the entire block.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-12 13:58:11 -07:00
Zach Brown
362fc0ab62 scoutfs-utils: update format.h
The kernel format.h has built up some changes that the userspace utils
don't use.  We're about to start enforcing exact matching of the source
files at run time so let's bring these back in sync.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-12 13:58:11 -07:00
Zach Brown
f02944bd73 scoutfs-utils: update inode index item types
Signed-off-by: Zach Brown <zab@versity.com>
2017-10-09 15:32:03 -07:00
Zach Brown
589e9d10b9 scoutfs-utils: move to block mapping items
Update the format header and print output for the mapping items and free
bitmaps.

Signed-off-by: Zach Brown <zab@versity.com>
2017-09-19 11:26:00 -07:00
Zach Brown
288a752f42 scoutfs-utils: update key printing
The kernel key printing code was refactored to more carefully print
keys.  Import this updated code by adding supporting functions around it
so that we don't have to make edits to it and can easily update the
import in the future.

Signed-off-by: Zach Brown <zab@versity.com>
2017-09-06 10:37:18 -07:00
Mark Fasheh
2c89ff3a07 scoutfs-utils: remove inode ctime and mtime index items
These were removed in the kernel, we no longer need
them in userspace.

Signed-off-by: Mark Fasheh <mfasheh@versity.com>
2017-08-22 15:58:48 -07:00
Zach Brown
7684e7fcf6 scoutfs-utils: use exported types
format.h and ioctl.h are copied from the kernel module.  It had a habit
of accidentally using types that aren't exported to userspace.  It's
since added build checks that enforce exported types.  This copies the
fixed use of exported types over for hopefully the last time.

Signed-off-by: Zach Brown <zab@versity.com>
2017-08-17 15:27:22 -07:00
Zach Brown
7bbe49fde2 scoutfs-utils: sort keys by zones, then types
Our item cache protocol is tied to holding DLM locks which cover a
region of the item namespace.  We want locks to cover all the data
associated with an inode and other locks to cover the indexes.  So we
resort the items first by major (index, fs) then by inode type (inode,
dirent, etc).

Signed-off-by: Zach Brown <zab@versity.com>
2017-07-19 10:33:12 -07:00
Zach Brown
6c37e3dee0 scoutfs-utils: add btree ring storage
Manifest entries and segment allocation bitmap regions are now stored in
btree items instead of the ring log.  This lets us work with them
incrementally and share them between nodes.

Signed-off-by: Zach Brown <zab@versity.com>
2017-07-17 13:43:37 -07:00
Zach Brown
d78649e065 scoutfs-utils: support symlink item with nr field
Signed-off-by: Zach Brown <zab@versity.com>
2017-06-27 14:08:50 -07:00
Zach Brown
6ae8e9743f scoutfs-utils: add support for skip list segments
Signed-off-by: Zach Brown <zab@versity.com>
2017-06-27 14:07:25 -07:00
Zach Brown
228c5d8b4b scoutfs-utils: support meta and data seqs
Signed-off-by: Zach Brown <zab@versity.com>
2017-05-23 12:17:52 -07:00
Zach Brown
9fc99a8c31 scoutfs-utils: add support for inode index items
Add support for the inode index items which are replacing the seq walks
from the old btree structures.  We create the index items for the root
inode, can print out the items, and add a commmand to walk the indices.

Signed-off-by: Zach Brown <zab@versity.com>
2017-05-16 11:14:10 -07:00
Zach Brown
9c00602051 scoutfs-utils: print extent flags
Signed-off-by: Zach Brown <zab@versity.com>
2017-05-16 11:14:10 -07:00
Zach Brown
1c9a407059 scoutfs-utils: print extent items
Signed-off-by: Zach Brown <zab@versity.com>
2017-05-16 11:13:47 -07:00
Zach Brown
e09a216762 Support simpler ring entries
Add mkfs and print support for the simpler rings that the segment bitmap
allocator and manifest are now using.  Some other recent format header
updates come along for the ride.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
a147239022 Remove dead block, btree, and buddy code
Remove the last bits of the dead code from the old btree design.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
2e2ee3b2f1 Print symlink items
Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
77d0268cb2 Add printing xattrs
For now we only print the xattr names, not the values.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
16da3c182a Add printing link backref items
Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
acda5a3bf1 Add support for free_segs in super
The allocator records the total number of free segments in the super
block.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
44f8551fb6 Print data items
Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
52291b2c75 Update format for readdir_pos
We now track each parent dir's next readdir pos and the readdir pos of
each dirent.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
38c8a4901f Print orphan items
Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
c4f2563cc1 Update tools to new segment item layout
The segment item struct used to have fiddly packed offsets and lengths.
Now it's just normal fields so we can work with them directly and get
rid of the native item indirection.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
c2b47d84c1 Add next_seg_seq field to super
Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
484b34057a Update mkfs and print for treap ring
Update mkfs and print now that the manifest and allocator are stored in
treaps in the ring.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
7c4bc528c6 Make sure manifests cover all keys
Make sure that the manifest entries for a given level fully
cover the possible key space.  This helps item reading describe
cached key ranges that extend around items.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:42 -07:00
Zach Brown
c3b6dd0763 Describe ring log with index,nr
Update mkfs and print to describe the ring blocks with a starting index
and number of blocks instead of a head and tail index.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:42 -07:00
Zach Brown
818e149643 Update mkfs and print for lsm writing
Adapt mkfs and print for the format changes made to support writing
segments.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:42 -07:00
Zach Brown
c96b833a36 mkfs LSM segment and ring stuctures
Make a new file system by writing a root inode in a segment and storing
a manifest entry in the ring that references the segment.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:02 -07:00
Zach Brown
5fcf70b53e Catch up to kernel's scoutfs_extent
Signed-off-by: Zach Brown <zab@versity.com>
2016-11-17 19:48:05 -08:00
Zach Brown
41e3ca0f41 Consistently use __u8 in format.h
Signed-off-by: Zach Brown <zab@versity.com>
2016-11-17 19:47:39 -08:00
Zach Brown
22140c93d1 Print extents instead of bmap items
Print the extent items now that we're not using bmap items any more.

Signed-off-by: Zach Brown <zab@versity.com>
2016-11-16 14:40:04 -08:00