diff options
| author | Dmitry Torokhov <[email protected]> | 2017-09-04 09:22:54 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2017-09-04 09:22:54 -0700 | 
| commit | a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (patch) | |
| tree | 8960e571a398b5d32e72bdb9c89ce965daa870ab /fs/btrfs/disk-io.c | |
| parent | f5308d1b83eba20e69df5e0926ba7257c8dd9074 (diff) | |
| parent | 08d6ac9ee5fedd82040bc878705981b67a116a3f (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 4.14 merge window.
Diffstat (limited to 'fs/btrfs/disk-io.c')
| -rw-r--r-- | fs/btrfs/disk-io.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8685d67185d0..5f678dcb20e6 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3467,10 +3467,12 @@ static int write_dev_supers(struct btrfs_device *device,  		 * we fua the first super.  The others we allow  		 * to go down lazy.  		 */ -		if (i == 0) -			ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_FUA, bh); -		else +		if (i == 0) { +			ret = btrfsic_submit_bh(REQ_OP_WRITE, +						REQ_SYNC | REQ_FUA, bh); +		} else {  			ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_SYNC, bh); +		}  		if (ret)  			errors++;  	} @@ -3535,7 +3537,7 @@ static int write_dev_flush(struct btrfs_device *device, int wait)  	bio->bi_end_io = btrfs_end_empty_barrier;  	bio->bi_bdev = device->bdev; -	bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; +	bio->bi_opf = REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH;  	init_completion(&device->flush_wait);  	bio->bi_private = &device->flush_wait;  	device->flush_bio = bio;  |