sheepdog: use per AIOCB dirty indexes for non overlapping requests
authorHitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Tue, 1 Sep 2015 03:03:09 +0000 (12:03 +0900)
committerJeff Cody <jcody@redhat.com>
Fri, 25 Sep 2015 14:25:19 +0000 (10:25 -0400)
commit498f21405a286f718a0767c791b7d2db19f4e5bd
treecf28cab8e1c5c7bc3f32c9ce30d796afa109f78e
parent06c3916b35a1cf6db548450a0cfb96983c33c82f
sheepdog: use per AIOCB dirty indexes for non overlapping requests

In the commit 96b14ff85acf, requests for overlapping areas are
serialized. However, it cannot handle a case of non overlapping
requests. In such a case, min_dirty_data_idx and max_dirty_data_idx
can be overwritten by the requests and invalid inode update can
happen e.g. a case like create(1, 2) and create(3, 4) are issued in
parallel.

This patch lets SheepdogAIOCB have dirty data indexes instead of
BDRVSheepdogState for avoiding the above situation.

This patch also does trivial renaming for better description:
overwrapping -> overlapping

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-2-git-send-email-mitake.hitoshi@lab.ntt.co.jp
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/sheepdog.c