mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-24 17:04:15 +00:00
Move more block read/write functions to util
We're adding another command that does block IO so move some block reading and writing functions out of mkfs. We also grow a few function variants and call the write_sync variant from mkfs instead of having it manually sync. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -113,6 +113,14 @@ static inline int memcmp_lens(const void *a, int a_len,
|
||||
|
||||
int get_path(char *path, int flags);
|
||||
int read_block(int fd, u64 blkno, int shift, void **ret_val);
|
||||
int read_block_crc(int fd, u64 blkno, int shift, void **ret_val);
|
||||
int read_block_verify(int fd, u32 magic, u64 fsid, u64 blkno, int shift, void **ret_val);
|
||||
|
||||
struct scoutfs_block_header;
|
||||
int write_block(int fd, u32 magic, __le64 fsid, u64 seq, u64 blkno,
|
||||
int shift, struct scoutfs_block_header *hdr);
|
||||
int write_block_sync(int fd, u32 magic, __le64 fsid, u64 seq, u64 blkno,
|
||||
int shift, struct scoutfs_block_header *hdr);
|
||||
|
||||
#define __stringify_1(x) #x
|
||||
#define __stringify(x) __stringify_1(x)
|
||||
|
||||
Reference in New Issue
Block a user