Date: Mon, 9 Sep 2013 14:23:54 GMT From: zcore@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257157 - soc2013/zcore/head/usr.sbin/bhyve Message-ID: <201309091423.r89ENs3i004884@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zcore Date: Mon Sep 9 14:23:54 2013 New Revision: 257157 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257157 Log: add blockif_fsync and call it in handle_flush() path Modified: soc2013/zcore/head/usr.sbin/bhyve/block_if.c soc2013/zcore/head/usr.sbin/bhyve/block_if.h soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Modified: soc2013/zcore/head/usr.sbin/bhyve/block_if.c ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/block_if.c Mon Sep 9 13:56:58 2013 (r257156) +++ soc2013/zcore/head/usr.sbin/bhyve/block_if.c Mon Sep 9 14:23:54 2013 (r257157) @@ -335,6 +335,14 @@ return (0); } +int +blockif_fsync(struct blockif_ctxt *bc) +{ + + assert(bc->bc_magic == BLOCKIF_SIG); + return fsync(bc->bc_fd); +} + /* * Accessors */ Modified: soc2013/zcore/head/usr.sbin/bhyve/block_if.h ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/block_if.h Mon Sep 9 13:56:58 2013 (r257156) +++ soc2013/zcore/head/usr.sbin/bhyve/block_if.h Mon Sep 9 14:23:54 2013 (r257157) @@ -54,5 +54,6 @@ int blockif_write(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_close(struct blockif_ctxt *bc); +int blockif_fsync(struct blockif_ctxt *bc); #endif /* _BLOCK_IF_H_ */ Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Mon Sep 9 13:56:58 2013 (r257156) +++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Mon Sep 9 14:23:54 2013 (r257157) @@ -428,6 +428,7 @@ pthread_cond_wait(&p->flush_cond, &sc->mtx); p->flush_pending = 0; } + blockif_fsync(p->bctx); ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309091423.r89ENs3i004884>