Whamcloud - gitweb
LU-2078 ofd: drop locking in ofd_sync
authorPrakash Surya <surya1@llnl.gov>
Thu, 27 Sep 2012 22:37:10 +0000 (15:37 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Oct 2012 18:24:50 +0000 (14:24 -0400)
commit061f6421fcc9a41d53a3f66fff3848cb09b862ad
tree89d7e1396d6cdbea130b70a57d3a64d55085ec61
parent7e0fe6ee2ae50e47a03c9256ff9b88cd916415d3
LU-2078 ofd: drop locking in ofd_sync

Improve concurrency by dropping the write lock around
dt_object_sync(). This is safe because all consistency
related to a single object is supposed to be maintained
by the osd internally.  In this case:

  1) osd_object_sync() doesn't rely on the object at all:
     global sync is called
  2) even if object is being destroyed at the same time -
     we're holding a reference, so we're safe
  3) dt_version_get() -> osd_xattr_get() has own internal
     locking, protecting xattr consistency to improve
     concurrency

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I60c5b6a1d10afc717a24e7471071f1e2fdb89c29
Reviewed-on: http://review.whamcloud.com/4117
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/ofd/ofd_obd.c