All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilia Zykov <linux@izyk.ru>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Why doesn't the lvmcache support the discard (trim) command?
Date: Fri, 19 Oct 2018 01:56:04 +0300	[thread overview]
Message-ID: <de207689-775b-5c36-1443-e035f19ff65f@izyk.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

Maybe it will be implemented later? But it seems to me a little strange when there is no way to clear the cache from a garbage.
Maybe I do not understand? Can you please explain this behavior.
For example:

I have the full cached partition, with full cache:

[root@localhost ~]# df -h /data
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/test-data   12G   12G     0 100% /data
[root@localhost ~]# lvs -a
  LV              VG     Attr       LSize  Pool   Origin       Data%  Meta%  Move Log Cpy%Sync Convert
  data            test   Cwi-aoC--- 12.00g [fast] [data_corig] 99.72  2.93            0.00
  [data_corig]    test   owi-aoC--- 12.00g
  [fast]          test   Cwi---C---  1.00g                     99.72  2.93            0.00
  [fast_cdata]    test   Cwi-ao----  1.00g
  [fast_cmeta]    test   ewi-ao----  8.00m
  [lvol0_pmspare] test   ewi-------  8.00m

I clear the partition and do fstrim:

[root@localhost ~]# rm -rf /data/*
[root@localhost ~]# fstrim -v /data
[root@localhost ~]# df -h /data
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/test-data   12G   41M   12G   1% /data


But the cache remained full:

[root@localhost ~]# lvs -a
  LV              VG     Attr       LSize  Pool   Origin       Data%  Meta%  Move Log Cpy%Sync Convert
  data            test   Cwi-aoC--- 12.00g [fast] [data_corig] 99.72  2.93            0.00
  [data_corig]    test   owi-aoC--- 12.00g
  [fast]          test   Cwi---C---  1.00g                     99.72  2.93            0.00
  [fast_cdata]    test   Cwi-ao----  1.00g
  [fast_cmeta]    test   ewi-ao----  8.00m
  [lvol0_pmspare] test   ewi-------  8.00m

Thank you.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3980 bytes --]

             reply	other threads:[~2018-10-18 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 22:56 Ilia Zykov [this message]
2018-10-19  9:12 ` [linux-lvm] Why doesn't the lvmcache support the discard (trim) command? Zdenek Kabelac
2018-10-19  9:42   ` Gionatan Danti
2018-10-19  9:49     ` Zdenek Kabelac
2018-10-19  9:55   ` Ilia Zykov
2018-10-19 10:58     ` Zdenek Kabelac
2018-10-19 12:45       ` Gionatan Danti
2018-10-19 13:08         ` Zdenek Kabelac
2018-10-19 13:16           ` Ilia Zykov
2018-10-19 17:00           ` Ilia Zykov
2018-10-22 10:54             ` Zdenek Kabelac
2018-10-19 20:54           ` Gionatan Danti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de207689-775b-5c36-1443-e035f19ff65f@izyk.ru \
    --to=linux@izyk.ru \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.