• K
    nbd: Support BDRV_REQ_FUA · 2b556518
    Kevin Wolf 提交于
    The NBD server already used to send a FUA flag when the writethrough
    mode was set. This code was a remnant from the times where protocol
    drivers actually had to implement writethrough modes. Since nowadays the
    block layer sends flushes in writethrough mode and non-root nodes are
    always writeback, this was mostly dead code - only mostly because if NBD
    was configured to be used without a format, we sent _both_ FUA and an
    explicit flush afterwards, which makes the code not technically dead,
    but useless overhead.
    
    This patch changes the code so that the block layer's FUA flag is
    recognised and translated into a NBD FUA flag. The additional flush is
    avoided now.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NMax Reitz <mreitz@redhat.com>
    2b556518
nbd-client.c 12.9 KB