Skip to content

Commit 9cf05b4

Browse files
author
Joern Engel
committed
[LogFS] Remove h_version field
Incompatible change: h_compr is moved up so the padding is all in one chunk.
1 parent 6a08ab8 commit 9cf05b4

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎fs/logfs/journal.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,13 @@ static size_t __logfs_write_header(struct logfs_super *super,
419419
{
420420
jh->h_len = cpu_to_be16(len);
421421
jh->h_type = cpu_to_be16(type);
422-
jh->h_version = cpu_to_be16(++super->s_last_version);
423422
jh->h_datalen = cpu_to_be16(datalen);
424423
jh->h_compr = compr;
425424
jh->h_pad[0] = 'H';
426-
jh->h_pad[1] = 'A';
427-
jh->h_pad[2] = 'T';
425+
jh->h_pad[1] = 'E';
426+
jh->h_pad[2] = 'A';
427+
jh->h_pad[3] = 'D';
428+
jh->h_pad[4] = 'R';
428429
jh->h_crc = logfs_crc32(jh, len + sizeof(*jh), 4);
429430
return ALIGN(len, 16) + sizeof(*jh);
430431
}

‎fs/logfs/logfs_abi.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ SIZE_CHECK(logfs_segment_entry, 8);
422422
* not including header
423423
* @h_datalen: length of uncompressed data
424424
* @h_type: JE type
425-
* @h_version: unnormalized version of journal entry
426425
* @h_compr: compression type
427426
* @h_pad: reserved
428427
*/
@@ -431,9 +430,8 @@ struct logfs_journal_header {
431430
__be16 h_len;
432431
__be16 h_datalen;
433432
__be16 h_type;
434-
__be16 h_version;
435433
__u8 h_compr;
436-
__u8 h_pad[3];
434+
__u8 h_pad[5];
437435
};
438436

439437
SIZE_CHECK(logfs_journal_header, 16);

0 commit comments

Comments
 (0)