mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Linux 2.6.37 compat, WRITE_FLUSH_FUA
The WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags have been introduced as a replacement for WRITE_BARRIER. This was done to allow richer semantics to be expressed to the block layer. It is the block layers responsibility to choose the correct way to implement these semantics. This change simply updates the bio's to use the new kernel API which should be absolutely safe. However, since ZFS depends entirely on this working as designed for correctness we do want to be careful. Closes #281
This commit is contained in:
@@ -338,6 +338,20 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
|
||||
# define vdev_bdev_block_size(bdev) bdev_hardsect_size(bdev)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 2.6.37 API change
|
||||
* The WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags have been
|
||||
* introduced as a replacement for WRITE_BARRIER. This was done to
|
||||
* allow richer semantics to be expressed to the block layer. It is
|
||||
* the block layers responsibility to choose the correct way to
|
||||
* implement these semantics.
|
||||
*/
|
||||
#ifdef WRITE_FLUSH_FUA
|
||||
# define VDEV_WRITE_FLUSH_FUA WRITE_FLUSH_FUA
|
||||
#else
|
||||
# define VDEV_WRITE_FLUSH_FUA WRITE_BARRIER
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Default Linux IO Scheduler,
|
||||
* Setting the scheduler to noop will allow the Linux IO scheduler to
|
||||
|
||||
Reference in New Issue
Block a user