mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Recognize BIO_FLUSH requests and pass them to userland.
MFC after: 1 week
This commit is contained in:
parent
1c6689d58d
commit
204a4e196a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222225
@ -180,6 +180,7 @@ g_gate_start(struct bio *bp)
|
||||
break;
|
||||
case BIO_DELETE:
|
||||
case BIO_WRITE:
|
||||
case BIO_FLUSH:
|
||||
/* XXX: Hack to allow read-only mounts. */
|
||||
if ((sc->sc_flags & G_GATE_FLAG_READONLY) != 0) {
|
||||
g_io_deliver(bp, EPERM);
|
||||
@ -580,6 +581,7 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa
|
||||
switch (bp->bio_cmd) {
|
||||
case BIO_READ:
|
||||
case BIO_DELETE:
|
||||
case BIO_FLUSH:
|
||||
break;
|
||||
case BIO_WRITE:
|
||||
error = copyout(bp->bio_data, ggio->gctl_data,
|
||||
@ -643,6 +645,7 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa
|
||||
break;
|
||||
case BIO_DELETE:
|
||||
case BIO_WRITE:
|
||||
case BIO_FLUSH:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user