stable-2.02 - dev-cache: dev->bcache_fd default from 0 to -1
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=db7aef215afba518024aefea3e412f23cf7b80bd Commit: db7aef215afba518024aefea3e412f23cf7b80bd Parent: 667cfeeacfae7941b662bffede86e38d425575c5 Author: Zhao Heming <[email protected]> AuthorDate: Mon Jun 1 12:22:15 2020 -0500 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Oct 16 17:07:59 2020 +0200
dev-cache: dev->bcache_fd default from 0 to -1
This fix can avoid bcache_fd will mistakenly open/close in later.
Signed-off-by Zhao Heming <[email protected]>
--- lib/device/dev-cache.c | 1 + 1 file changed, 1 insertion(+)
lib/device/dev-cache.c +1 -0
@@ -66,6 +66,7 @@ static void _dev_init(struct device *dev, int max_error_count) dev->phys_block_size =-1 ; dev->block_size =-1 ; dev->fd =-1 ; + dev->bcache_fd =-1 ; dev->read_ahead =-1 ; dev->max_error_count = max_error_count;