Get trans seq from core seq

Get the next seq for a client transaction from the core seq in the super
block.  Remove its specific next_trans_seq field.

While making this change we switch to only using le64 in the network
message payloads, the rest of the processing now uses natural u64s.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-12-08 14:21:28 -08:00
parent 9051ceb6fc
commit 05ae756b74
2 changed files with 2 additions and 4 deletions

View File

@@ -690,7 +690,6 @@ struct scoutfs_super_block {
__u8 uuid[SCOUTFS_UUID_BYTES];
__le64 seq;
__le64 next_ino;
__le64 next_trans_seq;
__le64 total_meta_blocks; /* both static and dynamic */
__le64 first_meta_blkno; /* first dynamically allocated */
__le64 last_meta_blkno;

View File

@@ -983,8 +983,7 @@ static int server_advance_seq(struct super_block *sb,
if (ret < 0)
goto unlock;
seq = le64_to_cpu(super->next_trans_seq);
le64_add_cpu(&super->next_trans_seq, 1);
seq = scoutfs_server_next_seq(sb);
trace_scoutfs_trans_seq_advance(sb, rid, seq);
@@ -1058,7 +1057,7 @@ static int server_get_last_seq(struct super_block *sb,
last_seq = key.skts_trans_seq;
} else if (ret == -ENOENT) {
last_seq = super->next_trans_seq;
last_seq = cpu_to_le64(scoutfs_server_seq(sb));
ret = 0;
}