Skip to content

Commit d826cc5

Browse files
author
Kent Overstreet
committed
bcachefs: logged_ops_format.h
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 8d52ba6 commit d826cc5

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

fs/bcachefs/bcachefs_format.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -442,33 +442,6 @@ struct bch_lru {
442442

443443
#define LRU_ID_STRIPES (1U << 16)
444444

445-
/* Logged operations btree: */
446-
447-
struct bch_logged_op_truncate {
448-
struct bch_val v;
449-
__le32 subvol;
450-
__le32 pad;
451-
__le64 inum;
452-
__le64 new_i_size;
453-
};
454-
455-
enum logged_op_finsert_state {
456-
LOGGED_OP_FINSERT_start,
457-
LOGGED_OP_FINSERT_shift_extents,
458-
LOGGED_OP_FINSERT_finish,
459-
};
460-
461-
struct bch_logged_op_finsert {
462-
struct bch_val v;
463-
__u8 state;
464-
__u8 pad[3];
465-
__le32 subvol;
466-
__le64 inum;
467-
__le64 dst_offset;
468-
__le64 src_offset;
469-
__le64 pos;
470-
};
471-
472445
/* Optional/variable size superblock sections: */
473446

474447
struct bch_sb_field {
@@ -502,6 +475,7 @@ struct bch_sb_field {
502475
#include "dirent_format.h"
503476
#include "xattr_format.h"
504477
#include "quota_format.h"
478+
#include "logged_ops_format.h"
505479
#include "snapshot_format.h"
506480
#include "subvolume_format.h"
507481
#include "sb-counters_format.h"

fs/bcachefs/logged_ops_format.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _BCACHEFS_LOGGED_OPS_FORMAT_H
3+
#define _BCACHEFS_LOGGED_OPS_FORMAT_H
4+
5+
struct bch_logged_op_truncate {
6+
struct bch_val v;
7+
__le32 subvol;
8+
__le32 pad;
9+
__le64 inum;
10+
__le64 new_i_size;
11+
};
12+
13+
enum logged_op_finsert_state {
14+
LOGGED_OP_FINSERT_start,
15+
LOGGED_OP_FINSERT_shift_extents,
16+
LOGGED_OP_FINSERT_finish,
17+
};
18+
19+
struct bch_logged_op_finsert {
20+
struct bch_val v;
21+
__u8 state;
22+
__u8 pad[3];
23+
__le32 subvol;
24+
__le64 inum;
25+
__le64 dst_offset;
26+
__le64 src_offset;
27+
__le64 pos;
28+
};
29+
30+
#endif /* _BCACHEFS_LOGGED_OPS_FORMAT_H */

0 commit comments

Comments
 (0)