freebsd-dev/sys/geom/mirror
Gleb Smirnoff d89862ac87 Make geom_mirror more friendly to SSDs. To properly support TRIM,
we need to pass BIO_DELETE requests down to providers that support
it. Also, we need to announce our support for BIO_DELETE to upper
consumer. This requires:

- In g_mirror_start() return true for "GEOM::candelete" request.
- In g_mirror_init_disk() probe below provider for "GEOM::candelete"
  attribute, and mark disk with a flag if it does support BIO_DELETE.
- In g_mirror_register_request() distribute BIO_DELETE requests only
  to those disks, that do support it.

Note that we announce "GEOM::candelete" as true unconditionally of
whether we have TRIM-capable media down below or not. This is made
intentionally, because upper consumer (usually UFS) requests the
attribite only once at mount time. And if user ever migrates his
mirror from HDDs to SSDs, then he/she would get TRIM working without
remounting filesystem.

Reviewed by:	pjd
2012-07-01 15:43:52 +00:00
..
g_mirror_ctl.c Prevent removing of the last active component from a mirror. 2012-05-18 09:22:21 +00:00
g_mirror.c Make geom_mirror more friendly to SSDs. To properly support TRIM, 2012-07-01 15:43:52 +00:00
g_mirror.h Make geom_mirror more friendly to SSDs. To properly support TRIM, 2012-07-01 15:43:52 +00:00