summaryrefslogtreecommitdiff
path: root/debian/patches/0006-libdiskfs-make-struct-node-more-compact.patch
blob: f3f70c1e618fe46f8752a2c0c7cda0ebb747e668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 8de411c5ad1f20f52a562f79b08de17187ff1920 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Tue, 14 Apr 2015 21:17:19 +0200
Subject: [PATCH hurd 06/16] libdiskfs: make struct node more compact

* libdiskfs/diskfs.h (struct node): Turn flags into a bit field.
---
 libdiskfs/diskfs.h | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 535fb39..18df0eb 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -86,13 +86,20 @@ struct node
 
   io_statbuf_t dn_stat;
 
+  /* Flags.  */
+  unsigned int
+
   /* Stat has been modified if one of the following four fields
      is nonzero.  Also, if one of the dn_set_?time fields is nonzero,
      the appropriate dn_stat.st_?tim field needs to be updated. */
-  int dn_set_ctime;
-  int dn_set_atime;
-  int dn_set_mtime;
-  int dn_stat_dirty;
+    dn_set_ctime:1,
+    dn_set_atime:1,
+    dn_set_mtime:1,
+    dn_stat_dirty:1,
+
+  /* Indicate whether the author is tracking the uid because the
+     on-disk file format does not encode a separate author.  */
+    author_tracks_uid:1;
 
   pthread_mutex_t lock;
 
@@ -117,8 +124,6 @@ struct node
   loff_t allocsize;
 
   ino64_t cache_id;
-
-  int author_tracks_uid;
 };
 
 struct diskfs_control
-- 
2.1.4