git: cb28dfb27d12 - main - md(4): Add dummy support of the BIO_FLUSH command for malloc and swap backend.

From: Aleksandr Fedorov <afedorov_at_FreeBSD.org>
Date: Thu, 17 Feb 2022 19:25:08 UTC
The branch main has been updated by afedorov:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb28dfb27d12f1cbd7831f370c01493c01d74b10

commit cb28dfb27d12f1cbd7831f370c01493c01d74b10
Author:     Aleksandr Fedorov <afedorov@FreeBSD.org>
AuthorDate: 2022-02-17 19:21:56 +0000
Commit:     Aleksandr Fedorov <afedorov@FreeBSD.org>
CommitDate: 2022-02-17 19:21:56 +0000

    md(4): Add dummy support of the BIO_FLUSH command for malloc and swap
    backend.
    
    PR:     260200
    Reported by:    editor@callfortesting.org
    Reviewed by:    vmaffione (mentor), markj
    Approved by:    vmaffione (mentor), markj
    Differential Revision:  https://reviews.freebsd.org/D34260
---
 sys/dev/md/md.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index bd83345d8e37..29dabbdf9d4e 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -646,6 +646,8 @@ mdstart_malloc(struct md_s *sc, struct bio *bp)
 	case BIO_WRITE:
 	case BIO_DELETE:
 		break;
+	case BIO_FLUSH:
+		return (0);
 	default:
 		return (EOPNOTSUPP);
 	}
@@ -1026,6 +1028,8 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
 	case BIO_WRITE:
 	case BIO_DELETE:
 		break;
+	case BIO_FLUSH:
+		return (0);
 	default:
 		return (EOPNOTSUPP);
 	}