[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[committed hurd 06/13] libdiskfs: make struct node more compact
From: |
Justus Winter |
Subject: |
[committed hurd 06/13] libdiskfs: make struct node more compact |
Date: |
Fri, 17 Apr 2015 22:34:05 +0200 |
* 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
- [committed hurd 01/13] ext2fs: use a seperate lock to protect nodehash, Justus Winter, 2015/04/17
- [committed hurd 03/13] isofs: use a seperate lock to protect node_cache, Justus Winter, 2015/04/17
- [committed hurd 04/13] tmpfs: use a seperate lock to protect all_nodes, Justus Winter, 2015/04/17
- [committed hurd 06/13] libdiskfs: make struct node more compact,
Justus Winter <=
- [committed hurd 07/13] libdiskfs: drop unused fields from struct node, Justus Winter, 2015/04/17
- [committed hurd 02/13] fatfs: use a seperate lock to protect nodehash, Justus Winter, 2015/04/17
- [committed hurd 08/13] libdiskfs: fix node initialization, Justus Winter, 2015/04/17
- [committed hurd 09/13] libdiskfs: declare all inline functions as `extern inline', Justus Winter, 2015/04/17
- [committed hurd 05/13] libdiskfs: lock-less reference counting of nodes, Justus Winter, 2015/04/17
- [committed hurd 11/13] libdiskfs: implement a node cache, Justus Winter, 2015/04/17
- [committed hurd 10/13] ext2fs: use fat nodes, Justus Winter, 2015/04/17
- [committed hurd 12/13] isofs: port to libdiskfs' node cache, Justus Winter, 2015/04/17
- [committed hurd 13/13] fatfs: port to libdiskfs' node cache, Justus Winter, 2015/04/17