btrfs: reformat remaining kdoc style comments

Function name in the comment does not bring much value to code not
exposed as API and we don't stick to the kdoc format anymore. Update
formatting of parameter descriptions.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-09-08 01:09:25 +02:00
parent 33b6b25191
commit 9580503bcb
18 changed files with 62 additions and 51 deletions

View File

@ -2080,8 +2080,8 @@ static int search_leaf(struct btrfs_trans_handle *trans,
}
/*
* btrfs_search_slot - look for a key in a tree and perform necessary
* modifications to preserve tree invariants.
* Look for a key in a tree and perform necessary modifications to preserve
* tree invariants.
*
* @trans: Handle of transaction, used when modifying the tree
* @p: Holds all btree nodes along the search path

View File

@ -328,7 +328,8 @@ static struct btrfs_delayed_item *btrfs_alloc_delayed_item(u16 data_len,
}
/*
* __btrfs_lookup_delayed_item - look up the delayed item by key
* Look up the delayed item by key.
*
* @delayed_node: pointer to the delayed node
* @index: the dir index value to lookup (offset of a dir index key)
*
@ -1760,8 +1761,7 @@ int btrfs_should_delete_dir_index(struct list_head *del_list,
}
/*
* btrfs_readdir_delayed_dir_index - read dir info stored in the delayed tree
*
* Read dir info stored in the delayed tree.
*/
int btrfs_readdir_delayed_dir_index(struct dir_context *ctx,
struct list_head *ins_list)

View File

@ -837,8 +837,7 @@ add_delayed_ref_head(struct btrfs_trans_handle *trans,
}
/*
* init_delayed_ref_common - Initialize the structure which represents a
* modification to a an extent.
* Initialize the structure which represents a modification to a an extent.
*
* @fs_info: Internal to the mounted filesystem mount structure.
*

View File

@ -1403,7 +1403,8 @@ struct btrfs_root *btrfs_get_new_fs_root(struct btrfs_fs_info *fs_info,
}
/*
* btrfs_get_fs_root_commit_root - return a root for the given objectid
* Return a root for the given objectid.
*
* @fs_info: the fs_info
* @objectid: the objectid we need to lookup
*
@ -1700,11 +1701,11 @@ static void backup_super_roots(struct btrfs_fs_info *info)
}
/*
* read_backup_root - Reads a backup root based on the passed priority. Prio 0
* is the newest, prio 1/2/3 are 2nd newest/3rd newest/4th (oldest) backup roots
* Reads a backup root based on the passed priority. Prio 0 is the newest, prio
* 1/2/3 are 2nd newest/3rd newest/4th (oldest) backup roots
*
* fs_info - filesystem whose backup roots need to be read
* priority - priority of backup root required
* @fs_info: filesystem whose backup roots need to be read
* @priority: priority of backup root required
*
* Returns backup root index on success and -EINVAL otherwise.
*/

View File

@ -1435,7 +1435,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
}
/*
* __btrfs_inc_extent_ref - insert backreference for a given extent
* Insert backreference for a given extent.
*
* The counterpart is in __btrfs_free_extent(), with examples and more details
* how it works.
@ -4442,8 +4442,8 @@ static noinline int find_free_extent(struct btrfs_root *root,
}
/*
* btrfs_reserve_extent - entry point to the extent allocator. Tries to find a
* hole that is at least as big as @num_bytes.
* Entry point to the extent allocator. Tries to find a hole that is at least
* as big as @num_bytes.
*
* @root - The root that will contain this extent
*

View File

@ -4248,14 +4248,14 @@ void copy_extent_buffer(const struct extent_buffer *dst,
}
/*
* eb_bitmap_offset() - calculate the page and offset of the byte containing the
* given bit number
* @eb: the extent buffer
* @start: offset of the bitmap item in the extent buffer
* @nr: bit number
* @page_index: return index of the page in the extent buffer that contains the
* given bit number
* @page_offset: return offset into the page given by page_index
* Calculate the page and offset of the byte containing the given bit number.
*
* @eb: the extent buffer
* @start: offset of the bitmap item in the extent buffer
* @nr: bit number
* @page_index: return index of the page in the extent buffer that contains
* the given bit number
* @page_offset: return offset into the page given by page_index
*
* This helper hides the ugliness of finding the byte in an extent buffer which
* contains a given bit.
@ -4614,7 +4614,8 @@ int try_release_extent_buffer(struct page *page)
}
/*
* btrfs_readahead_tree_block - attempt to readahead a child block
* Attempt to readahead a child block.
*
* @fs_info: the fs_info
* @bytenr: bytenr to read
* @owner_root: objectid of the root that owns this eb
@ -4653,7 +4654,8 @@ void btrfs_readahead_tree_block(struct btrfs_fs_info *fs_info,
}
/*
* btrfs_readahead_node_child - readahead a node's child block
* Readahead a node's child block.
*
* @node: parent node we're reading from
* @slot: slot in the parent node for the child we want to read
*

View File

@ -247,7 +247,7 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
}
/*
* btrfs_insert_inode_extref() - Inserts an extended inode ref into a tree.
* Insert an extended inode ref into a tree.
*
* The caller must have checked against BTRFS_LINK_MAX already.
*/

View File

@ -348,7 +348,7 @@ static void __cold btrfs_print_data_csum_error(struct btrfs_inode *inode,
}
/*
* btrfs_inode_lock - lock inode i_rwsem based on arguments passed
* Lock inode i_rwsem based on arguments passed.
*
* ilock_flags can have the following bit set:
*
@ -382,7 +382,7 @@ int btrfs_inode_lock(struct btrfs_inode *inode, unsigned int ilock_flags)
}
/*
* btrfs_inode_unlock - unock inode i_rwsem
* Unock inode i_rwsem.
*
* ilock_flags should contain the same bits set as passed to btrfs_inode_lock()
* to decide whether the lock acquired is shared or exclusive.
@ -3306,7 +3306,7 @@ bool btrfs_data_csum_ok(struct btrfs_bio *bbio, struct btrfs_device *dev,
}
/*
* btrfs_add_delayed_iput - perform a delayed iput on @inode
* Perform a delayed iput on @inode.
*
* @inode: The inode we want to perform iput on
*
@ -4641,7 +4641,8 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
}
/*
* btrfs_truncate_block - read, zero a chunk and write a block
* Read, zero a chunk and write a block.
*
* @inode - inode that we're zeroing
* @from - the offset to start zeroing
* @len - the length to zero, 0 to zero the entire range respective to the

View File

@ -182,7 +182,8 @@ void btrfs_tree_read_unlock(struct extent_buffer *eb)
}
/*
* __btrfs_tree_lock - lock eb for write
* Lock eb for write.
*
* @eb: the eb to lock
* @nest: the nesting to use for the lock
*

View File

@ -110,8 +110,8 @@ const char * __attribute_const__ btrfs_decode_error(int errno)
}
/*
* __btrfs_handle_fs_error decodes expected errors from the caller and
* invokes the appropriate error response.
* Decodes expected errors from the caller and invokes the appropriate error
* response.
*/
__cold
void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function,
@ -283,8 +283,8 @@ void __cold btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info)
#endif
/*
* __btrfs_panic decodes unexpected, fatal errors from the caller, issues an
* alert, and either panics or BUGs, depending on mount options.
* Decode unexpected, fatal errors from the caller, issue an alert, and either
* panic or BUGs, depending on mount options.
*/
__cold
void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,

View File

@ -652,7 +652,7 @@ static void dump_block_entry(struct btrfs_fs_info *fs_info,
}
/*
* btrfs_ref_tree_mod: called when we modify a ref for a bytenr
* Called when we modify a ref for a bytenr.
*
* This will add an action item to the given bytenr and do sanity checks to make
* sure we haven't messed something up. If we are making a new allocation and

View File

@ -51,7 +51,8 @@ static void btrfs_read_root_item(struct extent_buffer *eb, int slot,
}
/*
* btrfs_find_root - lookup the root by the key.
* Lookup the root by the key.
*
* root: the root of the root tree
* search_key: the key to search
* path: the path we search
@ -485,7 +486,8 @@ void btrfs_update_root_times(struct btrfs_trans_handle *trans,
}
/*
* btrfs_subvolume_reserve_metadata() - reserve space for subvolume operation
* Reserve space for subvolume operation.
*
* root: the root of the parent directory
* rsv: block reservation
* items: the number of items that we need do reservation

View File

@ -978,7 +978,8 @@ static bool steal_from_global_rsv(struct btrfs_fs_info *fs_info,
}
/*
* maybe_fail_all_tickets - we've exhausted our flushing, start failing tickets
* We've exhausted our flushing, start failing tickets.
*
* @fs_info - fs_info for this fs
* @space_info - the space info we were flushing
*

View File

@ -817,7 +817,7 @@ struct btrfs_trans_handle *btrfs_join_transaction_nostart(struct btrfs_root *roo
}
/*
* btrfs_attach_transaction() - catch the running transaction
* Catch the running transaction.
*
* It is used when we want to commit the current the transaction, but
* don't want to start a new one.
@ -836,7 +836,7 @@ struct btrfs_trans_handle *btrfs_attach_transaction(struct btrfs_root *root)
}
/*
* btrfs_attach_transaction_barrier() - catch the running transaction
* Catch the running transaction.
*
* It is similar to the above function, the difference is this one
* will wait for all the inactive transactions until they fully

View File

@ -2848,10 +2848,9 @@ static inline void btrfs_remove_all_log_ctxs(struct btrfs_root *root,
}
/*
* btrfs_sync_log does sends a given tree log down to the disk and
* updates the super blocks to record it. When this call is done,
* you know that any inodes previously logged are safely on disk only
* if it returns 0.
* Sends a given tree log down to the disk and updates the super blocks to
* record it. When this call is done, you know that any inodes previously
* logged are safely on disk only if it returns 0.
*
* Any other return value means you need to call btrfs_commit_transaction.
* Some of the edge cases for fsyncing directories that have had unlinks

View File

@ -223,7 +223,8 @@ int ulist_add_merge(struct ulist *ulist, u64 val, u64 aux,
}
/*
* ulist_del - delete one node from ulist
* Delete one node from ulist.
*
* @ulist: ulist to remove node from
* @val: value to delete
* @aux: aux to delete

View File

@ -3027,7 +3027,8 @@ static int btrfs_del_sys_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset)
}
/*
* btrfs_get_chunk_map() - Find the mapping containing the given logical extent.
* Find the mapping containing the given logical extent.
*
* @logical: Logical block offset in bytes.
* @length: Length of extent in bytes.
*

View File

@ -145,7 +145,7 @@ static void zstd_reclaim_timer_fn(struct timer_list *timer)
}
/*
* zstd_calc_ws_mem_sizes - calculate monotonic memory bounds
* Calculate monotonic memory bounds.
*
* It is possible based on the level configurations that a higher level
* workspace uses less memory than a lower level workspace. In order to reuse
@ -218,7 +218,8 @@ void zstd_cleanup_workspace_manager(void)
}
/*
* zstd_find_workspace - find workspace
* Find workspace for given level.
*
* @level: compression level
*
* This iterates over the set bits in the active_map beginning at the requested
@ -256,7 +257,8 @@ static struct list_head *zstd_find_workspace(unsigned int level)
}
/*
* zstd_get_workspace - zstd's get_workspace
* Zstd get_workspace for level.
*
* @level: compression level
*
* If @level is 0, then any compression level can be used. Therefore, we begin
@ -296,7 +298,8 @@ struct list_head *zstd_get_workspace(unsigned int level)
}
/*
* zstd_put_workspace - zstd put_workspace
* Zstd put_workspace.
*
* @ws: list_head for the workspace
*
* When putting back a workspace, we only need to update the LRU if we are of