diff options
author | David Sterba <dsterba@suse.cz> | 2014-07-30 00:25:45 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-02 17:30:28 +0200 |
commit | bfebd8b5441755f228ad02273682d675d3335123 (patch) | |
tree | 3474dbe72cb9605ace32424983f1f5e3e977aea8 /fs/btrfs/disk-io.c | |
parent | 01d5bc3789f8464abd13cc44e3cd6df9d17f2802 (diff) | |
download | lwn-bfebd8b5441755f228ad02273682d675d3335123.tar.gz lwn-bfebd8b5441755f228ad02273682d675d3335123.zip |
btrfs: use enum for wq endio metadata type
The enum exists but is not consistently used.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 9b2a741370b7..d7cb58ed2946 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -82,7 +82,7 @@ struct end_io_wq { void *private; struct btrfs_fs_info *info; int error; - int metadata; + enum btrfs_wq_endio_type metadata; struct list_head list; struct btrfs_work work; }; @@ -733,16 +733,8 @@ static void end_workqueue_bio(struct bio *bio, int err) btrfs_queue_work(wq, &end_io_wq->work); } -/* - * For the metadata arg you want - * - * 0 - if data - * 1 - if normal metadta - * 2 - if writing to the free space cache area - * 3 - raid parity work - */ int btrfs_bio_wq_end_io(struct btrfs_fs_info *info, struct bio *bio, - int metadata) + enum btrfs_wq_endio_type metadata) { struct end_io_wq *end_io_wq; @@ -930,7 +922,7 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio, * can happen in the async kernel threads */ ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, - bio, 1); + bio, BTRFS_WQ_ENDIO_METADATA); if (ret) goto out_w_error; ret = btrfs_map_bio(BTRFS_I(inode)->root, rw, bio, |