https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2015-11-12T12:52:19ZCeph CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=614652015-11-12T12:52:19ZJohn Sprayjcspray@gmail.com
<ul></ul><p>NB the difference between this and <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Ceph file system is not freeing space (Resolved)" href="https://tracker.ceph.com/issues/13777">#13777</a> is that in the other bug, we are seeing strays getting stuck (never getting purged) whereas here we are seeing purge go ahead but objects not being properly cleaned up</p> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=614662015-11-12T12:52:27ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-4 priority-default closed" href="/issues/13777">Bug #13777</a>: Ceph file system is not freeing space</i> added</li></ul> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=615342015-11-13T08:59:04ZZheng Yanukernel@gmail.com
<ul></ul><p>John Spray wrote:</p>
<blockquote>
<p>It seems like there is a premature purge happening when the head revision is unlinked, the stray dentry for the file (file_a in the test) goes away at that point, and subsequently when the snapshot is deleted we are not purging anything. If you let it pass by the assertion that the purge shouldn't happen after unlink and run to the end of the test, you'll also see that the number of objects in the data pool does not fall to zero.</p>
</blockquote>
<p>this behaviour is expect. When modifying a regular inode with nlink == 1, we create a separate snap inode. If we delete unlink the head inode, it get purged. (snapshotted directory inode does not get purged until all snapshots are removed)</p>
<p>I ran commands in your test manually, number of objects in data pool did go to zero.</p> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=615942015-11-16T12:10:26ZJohn Sprayjcspray@gmail.com
<ul></ul><p>I've pushed an updated test branch which removes the mid-test assertions to avoid confusion.</p>
<p>Not only are the snapshot parts not purged, but there is also a HEAD instance of the file_a 0th object visible at the end of the test.</p> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=615952015-11-16T13:03:15ZZheng Yanukernel@gmail.com
<ul></ul><p>the head object is created by Client::check_pool_perm().(we should skip the check for reading snapshot). the reason of old snapshots not get purged is the same as <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Ceph file system is not freeing space (Resolved)" href="https://tracker.ceph.com/issues/13777">#13777</a>. (mds does not have capability to remove snapshot)</p> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=622282015-12-01T14:54:04ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p><a class="external" href="https://github.com/ceph/ceph/pull/6603">https://github.com/ceph/ceph/pull/6603</a></p> CephFS - Bug #13782: Snapshotted files not properly purgedhttps://tracker.ceph.com/issues/13782?journal_id=746682016-07-13T05:54:26ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Component(FS)</strong> <i>MDS</i> added</li></ul>