[lvm-devel] lvmcache lv destroy with no flush
Zdenek Kabelac
zkabelac at redhat.com
Mon Aug 5 10:43:46 UTC 2019
Dne 05. 08. 19 v 10:45 Lakshmi Narasimhan Sundararajan napsal(a):
> Thanks Zdenek, for your follow up email clarifying my questions.
>
> I will have to check further and shall report back.
>
> But, I also wonder why on a writeback cache even if I do submit blkdiscard to
> the whole device, the dirty blocks do not fall to zero?
>
> Does blkdiscard on lvmcache device not work?
>
> > myhome$ sudo dmsetup status --target cache
>
> > pxtest-pool: 0 20963328 cache 8 40/2048 2048 4096/10220 28 58 0 0 0 0 4096
> 1 writethrough 2 migration_threshold 2048 cleaner 0 rw -
>
> > myhome$
>
> > myhome$ sudo blkdev –getsize64 /dev/pxtest/pool
>
> <devsize>
>
> >myhome$ sudo blkdiscard -o 0 -l ROUND_DISCARD_ALIGN(devsize) /dev/pxtest/pool
>
> Even after the above discard, the lvmcache device in writeback mode holds
> dirty blocks. And has to be flushed. Can you please help explain the behavior
> here?
>
Are you using latest kernels ?
Original initial release of cache was (if I remeber correctly) not supporting
discard operation on such device.
On the latest kernels all should work...
Regards
Zdenek
More information about the lvm-devel
mailing list