Skip to contentSkip to conversation

cifs: move time field in cifsInodeInfo

PATCH In review Jeff Layton 3 participants 6 messages Dec 30, 2010 – Dec 31, 2010 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: move time field in cifsInodeInfo

...and remove length qualifiers from bools.

Before:

	/* size: 1176, cachelines: 19, members: 13 */
	/* sum members: 1165, holes: 2, sum holes: 11 */
	/* bit holes: 1, sum bit holes: 4 bits */
	/* last cacheline: 24 bytes */

After:

	/* size: 1168, cachelines: 19, members: 13 */
	/* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +5 -5
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
 	/* BB add in lists for dirty pages i.e. write caching info for oplock */
 	struct list_head openFileList;
 	__u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-	unsigned long time;	/* jiffies of last update/check of inode */
-	bool clientCanCacheRead:1;	/* read oplock */
-	bool clientCanCacheAll:1;	/* read and writebehind oplock */
-	bool delete_pending:1;		/* DELETE_ON_CLOSE is set */
-	bool invalid_mapping:1;		/* pagecache is invalid */
+	bool clientCanCacheRead;	/* read oplock */
+	bool clientCanCacheAll;		/* read and writebehind oplock */
+	bool delete_pending;		/* DELETE_ON_CLOSE is set */
+	bool invalid_mapping;		/* pagecache is invalid */
+	unsigned long time;		/* jiffies of last update of inode */
 	u64  server_eof;		/* current file size on server */
 	u64  uniqueid;			/* server inode number */
 	u64  createtime;		/* creation time on server */
Signature · 1 line
1.7.3.4

A message that is not in the archive (sent off-list or not yet received): 1293721034-31120-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#2 lore raw

2010/12/30 Jeff Layton <[email protected]>:

Quoted 45 lines

...and remove length qualifiers from bools.

Before:

       /* size: 1176, cachelines: 19, members: 13 */ /* sum members: 1165, holes: 2, sum holes: 11 */ /* bit holes: 1, sum bit holes: 4 bits */ /* last cacheline: 24 bytes */

After:

       /* size: 1168, cachelines: 19, members: 13 */ /* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----

 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +0 -0
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
        /* BB add in lists for dirty pages i.e. write caching info for oplock */
        struct list_head openFileList;

       __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-       unsigned long time;     /* jiffies of last update/check of inode */
-       bool clientCanCacheRead:1;      /* read oplock */
-       bool clientCanCacheAll:1;       /* read and writebehind oplock */
-       bool delete_pending:1;          /* DELETE_ON_CLOSE is set */
-       bool invalid_mapping:1;         /* pagecache is invalid */
+       bool clientCanCacheRead;        /* read oplock */
+       bool clientCanCacheAll;         /* read and writebehind oplock */
+       bool delete_pending;            /* DELETE_ON_CLOSE is set */
+       bool invalid_mapping;           /* pagecache is invalid */
+       unsigned long time;             /* jiffies of last update of inode */ u64  server_eof;                /* current file size on server */ u64  uniqueid;                  /* server inode number */ u64  createtime;                /* creation time on server */ --
1.7.3.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks good. May be we should rename clientCanCache* to client_can_cache_*?

Anyway - Reviewed-by: Pavel Shilovsky <[email protected]>

Signature · 2 lines
Best regards,
Pavel Shilovsky.

A message that is not in the archive (sent off-list or not yet received): AANLkTimrSu3a9pOqCi7AtDp49AndT2q+ct+80RrM3+RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
Quoted 54 lines · On Thu, 30 Dec 2010 18:14:34 +0300 Pavel Shilovsky…

2010/12/30 Jeff Layton <[email protected]>:

Quoted 45 lines

...and remove length qualifiers from bools.

Before:

       /* size: 1176, cachelines: 19, members: 13 */ /* sum members: 1165, holes: 2, sum holes: 11 */ /* bit holes: 1, sum bit holes: 4 bits */ /* last cacheline: 24 bytes */

After:

       /* size: 1168, cachelines: 19, members: 13 */ /* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----

 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +0 -0
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
        /* BB add in lists for dirty pages i.e. write caching info for oplock */
        struct list_head openFileList;

       __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-       unsigned long time;     /* jiffies of last update/check of inode */
-       bool clientCanCacheRead:1;      /* read oplock */
-       bool clientCanCacheAll:1;       /* read and writebehind oplock */
-       bool delete_pending:1;          /* DELETE_ON_CLOSE is set */
-       bool invalid_mapping:1;         /* pagecache is invalid */
+       bool clientCanCacheRead;        /* read oplock */
+       bool clientCanCacheAll;         /* read and writebehind oplock */
+       bool delete_pending;            /* DELETE_ON_CLOSE is set */
+       bool invalid_mapping;           /* pagecache is invalid */
+       unsigned long time;             /* jiffies of last update of inode */ u64  server_eof;                /* current file size on server */ u64  uniqueid;                  /* server inode number */ u64  createtime;                /* creation time on server */ --
1.7.3.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks good. May be we should rename clientCanCache* to client_can_cache_*?

Quoted 2 lines

Anyway - Reviewed-by: Pavel Shilovsky <[email protected]>

No objection to renaming fields. I actually wouldn't mind just keeping the oplock flag as sent by the server either rather than translating it into bools. Either way though, that should be a separate patch...

Signature · 1 line
Jeff Layton <[email protected]>

A message that is not in the archive (sent off-list or not yet received): 20101230102010.43a6b54a-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org

#6 lore raw

2010/12/30 Jeff Layton <[email protected]>:

Quoted 57 lines
Quoted 54 lines · On Thu, 30 Dec 2010 18:14:34 +0300 Pavel Shilovsky…

2010/12/30 Jeff Layton <[email protected]>:

Quoted 45 lines

...and remove length qualifiers from bools.

Before:

       /* size: 1176, cachelines: 19, members: 13 */ /* sum members: 1165, holes: 2, sum holes: 11 */ /* bit holes: 1, sum bit holes: 4 bits */ /* last cacheline: 24 bytes */

After:

       /* size: 1168, cachelines: 19, members: 13 */ /* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----

 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +0 -0
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
        /* BB add in lists for dirty pages i.e. write caching info for oplock */
        struct list_head openFileList;

       __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-       unsigned long time;     /* jiffies of last update/check of inode */
-       bool clientCanCacheRead:1;      /* read oplock */
-       bool clientCanCacheAll:1;       /* read and writebehind oplock */
-       bool delete_pending:1;          /* DELETE_ON_CLOSE is set */
-       bool invalid_mapping:1;         /* pagecache is invalid */
+       bool clientCanCacheRead;        /* read oplock */
+       bool clientCanCacheAll;         /* read and writebehind oplock */
+       bool delete_pending;            /* DELETE_ON_CLOSE is set */
+       bool invalid_mapping;           /* pagecache is invalid */
+       unsigned long time;             /* jiffies of last update of inode */ u64  server_eof;                /* current file size on server */ u64  uniqueid;                  /* server inode number */ u64  createtime;                /* creation time on server */ --
1.7.3.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks good. May be we should rename clientCanCache* to client_can_cache_*?

Quoted 6 lines
Quoted 2 lines

Anyway - Reviewed-by: Pavel Shilovsky <[email protected]>

No objection to renaming fields. I actually wouldn't mind just keeping the oplock flag as sent by the server either rather than translating it into bools. Either way though, that should be a separate patch...

Agree. MS-CIFS has another oplock value - batch - that we didn't implement yet. For the future, I think that keeping oplock flag is better than keeping three different values.

Signature · 2 lines
Best regards,
Pavel Shilovsky.
#7 lore raw
In reply to a message not in the archive
Quoted 58 lines · Jeff Layton
Quoted 54 lines · On Thu, 30 Dec 2010 18:14:34 +0300 Pavel Shilovsky…

2010/12/30 Jeff Layton <[email protected]>:

Quoted 45 lines

...and remove length qualifiers from bools.

Before:

       /* size: 1176, cachelines: 19, members: 13 */ /* sum members: 1165, holes: 2, sum holes: 11 */ /* bit holes: 1, sum bit holes: 4 bits */ /* last cacheline: 24 bytes */

After:

       /* size: 1168, cachelines: 19, members: 13 */ /* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----

 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +0 -0
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
        /* BB add in lists for dirty pages i.e. write caching info for oplock */
        struct list_head openFileList;

       __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-       unsigned long time;     /* jiffies of last update/check of inode */
-       bool clientCanCacheRead:1;      /* read oplock */
-       bool clientCanCacheAll:1;       /* read and writebehind oplock */
-       bool delete_pending:1;          /* DELETE_ON_CLOSE is set */
-       bool invalid_mapping:1;         /* pagecache is invalid */
+       bool clientCanCacheRead;        /* read oplock */
+       bool clientCanCacheAll;         /* read and writebehind oplock */
+       bool delete_pending;            /* DELETE_ON_CLOSE is set */
+       bool invalid_mapping;           /* pagecache is invalid */
+       unsigned long time;             /* jiffies of last update of inode */ u64  server_eof;                /* current file size on server */ u64  uniqueid;                  /* server inode number */ u64  createtime;                /* creation time on server */ --
1.7.3.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks good. May be we should rename clientCanCache* to client_can_cache_*?

Quoted 6 lines
Quoted 2 lines

Anyway - Reviewed-by: Pavel Shilovsky <[email protected]>

No objection to renaming fields. I actually wouldn't mind just keeping the oplock flag as sent by the server either rather than translating it into bools. Either way though, that should be a separate patch...

I don't mind booleans - on some archs the space saved can be significant. but in any case renaming fields from bool seems much lower priority than some of the other patches you all have submitted recently that add function or improve stability.

--
Thanks,

Steve

A message that is not in the archive (sent off-list or not yet received): AANLkTi=ATZ34x_jsRzbRQsMRtNC+8u0EDVUSqFeJvuD4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#9 lore raw
Quoted 62 lines · Steve French
Quoted 61 lines · Jeff Layton
Quoted 56 lines · On Thu, 30 Dec 2010 18:14:34 +0300 Pavel Shilovsky…

2010/12/30 Jeff Layton <[email protected]>:

Quoted 45 lines

...and remove length qualifiers from bools.

Before:

       /* size: 1176, cachelines: 19, members: 13 */ /* sum members: 1165, holes: 2, sum holes: 11 */ /* bit holes: 1, sum bit holes: 4 bits */ /* last cacheline: 24 bytes */

After:

       /* size: 1168, cachelines: 19, members: 13 */ /* last cacheline: 16 bytes */

...savings of 8 bytes per inode.

---
 fs/cifs/cifsglob.h |   10 +++++-----

 1 files changed, 5 insertions(+), 5 deletions(-)
fs/cifs/cifsglob.h +0 -0
index d6433a4..701060d 100644
@@ -439,11 +439,11 @@ struct cifsInodeInfo {
        /* BB add in lists for dirty pages i.e. write caching info for oplock */
        struct list_head openFileList;

       __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
-       unsigned long time;     /* jiffies of last update/check of inode */
-       bool clientCanCacheRead:1;      /* read oplock */
-       bool clientCanCacheAll:1;       /* read and writebehind oplock */
-       bool delete_pending:1;          /* DELETE_ON_CLOSE is set */
-       bool invalid_mapping:1;         /* pagecache is invalid */
+       bool clientCanCacheRead;        /* read oplock */
+       bool clientCanCacheAll;         /* read and writebehind oplock */
+       bool delete_pending;            /* DELETE_ON_CLOSE is set */
+       bool invalid_mapping;           /* pagecache is invalid */
+       unsigned long time;             /* jiffies of last update of inode */ u64  server_eof;                /* current file size on server */ u64  uniqueid;                  /* server inode number */ u64  createtime;                /* creation time on server */ --
1.7.3.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html

Looks good. May be we should rename clientCanCache* to client_can_cache_*?

Anyway - Reviewed-by: Pavel Shilovsky <[email protected]>

Quoted 8 lines
Quoted 3 lines

No objection to renaming fields. I actually wouldn't mind just keeping the oplock flag as sent by the server either rather than translating it into bools. Either way though, that should be a separate patch...

I don't mind booleans - on some archs the space saved can be significant. but in any case renaming fields from bool seems much lower priority than some of the other patches you all have submitted recently that add function or improve stability.

I had been thinking about requesting batch oplock for a while to improve caching of files which are only briefly closed and to allow multiple opens from the same client to be cached but decided to punt on this for cifs and just do it for smb2 (don't mind cifs patches for it - but it is not trivial). Fortunately in smb2 other oplock improvements help even more.

Signature · 3 lines
Thanks,

Steve