Skip to contentSkip to conversation

fs: add back TODO concerning printed info to dump_inode() and expand it

PATCH In review Mateusz Guzik 2 participants 3 messages Mar 31 – Apr 1 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: add back TODO concerning printed info to dump_inode() and expand it

I failed to notice the change which added get_kernel_nofault() usage removed it. It very much is still applicable.

---
 fs/inode.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/inode.c +6 -0
index 5e5cddd76a9d..912831645f38 100644
@@ -3100,6 +3100,12 @@ EXPORT_SYMBOL(mode_strip_sgid);
  *
  * If inode is an invalid pointer, we don't want to crash accessing it,
  * so probe everything depending on it carefully with get_kernel_nofault().
+ *
+ * TODO:
+ * - add more fields
+ * - pretty print flags instead of merely showing numerical values
+ * - consider extending inode ops with a ->dump_inode func so that filesystems
+ *   can print additional information
  */
 void dump_inode(struct inode *inode, const char *reason)
 {
Signature · 1 line
2.48.1
reviewer
#1 lore raw
Quoted 4 lines · Mateusz Guzik

I failed to notice the change which added get_kernel_nofault() usage removed it. It very much is still applicable.

I'm not strictly opposed but at the same time I'm not sure about the value of such TODO comments. Maybe better track it in some kernel-newbies project or something like that? I know there are lists of beginner's kernel tasks out there.

Honza

Quoted 24 lines
---
 fs/inode.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/inode.c +6 -0
index 5e5cddd76a9d..912831645f38 100644
@@ -3100,6 +3100,12 @@ EXPORT_SYMBOL(mode_strip_sgid);
  *
  * If inode is an invalid pointer, we don't want to crash accessing it,
  * so probe everything depending on it carefully with get_kernel_nofault().
+ *
+ * TODO:
+ * - add more fields
+ * - pretty print flags instead of merely showing numerical values
+ * - consider extending inode ops with a ->dump_inode func so that filesystems
+ *   can print additional information
  */
 void dump_inode(struct inode *inode, const char *reason)
 {
Signature · 1 line
2.48.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
Quoted 5 lines · Jan Kara
Quoted 3 lines · Mateusz Guzik

I failed to notice the change which added get_kernel_nofault() usage removed it. It very much is still applicable.

Quoted 7 lines
Quoted 1 line

I'm not strictly opposed but at the same time I'm not sure about the value of such TODO comments. Maybe better track it in some kernel-newbies project or something like that? I know there are lists of beginner's kernel tasks out there.

This is just few lines towards the end of the file, I don't think it should bother anyone.

I can't be bothered to add this elsewhere and I'm not going to argue one way or the other. if this patch gets dropped, so be it.