]> git.baikalelectronics.ru Git - kernel.git/commit
dm bufio: don't embed a bio in the dm_buffer structure
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 26 Mar 2018 18:29:47 +0000 (20:29 +0200)
committerMike Snitzer <snitzer@redhat.com>
Tue, 3 Apr 2018 19:04:29 +0000 (15:04 -0400)
commit98e856b2565411740e1dc022854c036cc436cac8
tree9b91b8be6fcf300e5f22ccaec4f506c6e0ee6725
parent3931dd1af7e3d79438ace90615910a011309be47
dm bufio: don't embed a bio in the dm_buffer structure

The bio structure consumes a substantial part of dm_buffer.  The bio
structure is only needed when doing I/O on the buffer, thus we don't
have to embed it in the buffer.

Allocate the bio structure only when doing I/O.

We don't need to create a bio_set because, in case of allocation
failure, dm-bufio falls back to using dm-io (which keeps its own
bio_set).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-bufio.c