sheepdog: refine discard support
commite6fd57ea297ec3aad32b24090c5d3757a99df3fe
authorHitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Tue, 1 Sep 2015 03:03:10 +0000 (1 12:03 +0900)
committerJeff Cody <jcody@redhat.com>
Fri, 25 Sep 2015 14:25:19 +0000 (25 10:25 -0400)
treefd0d1139239a34d8ba012a2a1b6370023d768fc1
parent498f21405a286f718a0767c791b7d2db19f4e5bd
sheepdog: refine discard support

This patch refines discard support of the sheepdog driver. The
existing discard mechanism was implemented on SD_OP_DISCARD_OBJ, which
was introduced before fine grained reference counting on newer
sheepdog. It doesn't care about relations of snapshots and clones and
discards objects unconditionally.

With this patch, the driver just updates an inode object for updating
reference. Removing the object is done in sheep process side.

Cc: Teruaki Ishizaki <ishizaki.teruaki@lab.ntt.co.jp>
Cc: Vasiliy Tolstov <v.tolstov@selfip.ru>
Cc: Jeff Cody <jcody@redhat.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Tested-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
Message-id: 1441076590-8015-3-git-send-email-mitake.hitoshi@lab.ntt.co.jp
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/sheepdog.c