Skip to content

Commit

Permalink
writeback: add comments to bdi_work structure
Browse files Browse the repository at this point in the history
And document its retriever, get_next_work_item().

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Sep 16, 2009
1 parent ce5f8e7 commit 8010c3b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ struct wb_writeback_args {
* Work items for the bdi_writeback threads
*/
struct bdi_work {
struct list_head list;
struct rcu_head rcu_head;
struct list_head list; /* pending work list */
struct rcu_head rcu_head; /* for RCU free/clear of work */

unsigned long seen;
atomic_t pending;
unsigned long seen; /* threads that have seen this work */
atomic_t pending; /* number of threads still to do work */

struct wb_writeback_args args;
struct wb_writeback_args args; /* writeback arguments */

unsigned long state;
unsigned long state; /* flag bits, see WS_* */
};

enum {
Expand Down Expand Up @@ -758,7 +758,11 @@ static long wb_writeback(struct bdi_writeback *wb,

/*
* Return the next bdi_work struct that hasn't been processed by this
* wb thread yet
* wb thread yet. ->seen is initially set for each thread that exists
* for this device, when a thread first notices a piece of work it
* clears its bit. Depending on writeback type, the thread will notify
* completion on either receiving the work (WB_SYNC_NONE) or after
* it is done (WB_SYNC_ALL).
*/
static struct bdi_work *get_next_work_item(struct backing_dev_info *bdi,
struct bdi_writeback *wb)
Expand Down

0 comments on commit 8010c3b

Please sign in to comment.