Skip to contentSkip to conversation

ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment

PATCH In review Yang Li 2 participants 2 messages Jan 10, 2022 Journalling layer for block devices (JBD2)

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment

Add the description of @shrink and @sc in jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment to remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/jbd2/journal.c:1296: warning: Function parameter or member 'shrink' not described in 'jbd2_journal_shrink_scan' fs/jbd2/journal.c:1296: warning: Function parameter or member 'sc' not described in 'jbd2_journal_shrink_scan' fs/jbd2/journal.c:1320: warning: Function parameter or member 'shrink' not described in 'jbd2_journal_shrink_count' fs/jbd2/journal.c:1320: warning: Function parameter or member 'sc' not described in 'jbd2_journal_shrink_count'

---
 fs/jbd2/journal.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/jbd2/journal.c +4 -0
index f13d548e4a7f..951e6382a884 100644
@@ -1287,6 +1287,8 @@ static int jbd2_min_tag_size(void)
 
 /**
  * jbd2_journal_shrink_scan()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
  *
  * Scan the checkpointed buffer on the checkpoint list and release the
  * journal_head.
@@ -1312,6 +1314,8 @@ static unsigned long jbd2_journal_shrink_scan(struct shrinker *shrink,
 
 /**
  * jbd2_journal_shrink_count()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
  *
  * Count the number of checkpoint buffers on the checkpoint list.
  */
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
Quoted 12 lines · Yang Li

Add the description of @shrink and @sc in jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment to remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/jbd2/journal.c:1296: warning: Function parameter or member 'shrink' not described in 'jbd2_journal_shrink_scan' fs/jbd2/journal.c:1296: warning: Function parameter or member 'sc' not described in 'jbd2_journal_shrink_scan' fs/jbd2/journal.c:1320: warning: Function parameter or member 'shrink' not described in 'jbd2_journal_shrink_count' fs/jbd2/journal.c:1320: warning: Function parameter or member 'sc' not described in 'jbd2_journal_shrink_count'

Quoted 2 lines

Thanks for the fix! Just one comment below:

Quoted 8 lines

/**
* jbd2_journal_shrink_scan()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
*
* Scan the checkpointed buffer on the checkpoint list and release the
* journal_head.

fs/jbd2/journal.c static unsigned long jbd2_journal_shrink_scan(struct shrinker *shrink, · line 1321

Quoted 8 lines
fs/jbd2/journal.c +2 -0
@@ -1312,6 +1314,8 @@ static unsigned long jbd2_journal_shrink_scan(struct shrinker *shrink,
 
 /**
  * jbd2_journal_shrink_count()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
  *
  * Count the number of checkpoint buffers on the checkpoint list.
  */

I think the comments are unnecessarily verbose and not really helping much. Maybe just something like:

* @shrink: shrinker to work on
* @sc: reclaim request to process

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR