Whamcloud - gitweb
LU-10048 ofd: take local locks within transaction 93/31293/63
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 13 Feb 2018 13:10:37 +0000 (16:10 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Aug 2019 02:21:11 +0000 (02:21 +0000)
commit9f79d4488fbb466647d1d09c2e6a1d3555d062fc
tree5e59d8a3a616b2be2724a0f809dfcb781b00a9d5
parent915135c37cbfa6851a5ec732afd20955eb020566
LU-10048 ofd: take local locks within transaction

The patch (with companion patch LU-10048 osd: async truncate)
addresses long outstanding technical debt resulting in different
locking order on MDT and OST. With OUT introduction this mismatch
lead to deadlocks as OUT is used by the both sides and can't easily
support two different locking models simultanously.

The unified locking rules are:
- open transaction (dt_trans_start()),
- then take a lock (dt_{read|write}_lock()).

Change-Id: I1eaeb58ae3d61869914293a9fea2d0a1faefe76b
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/31293
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_io.c
lustre/ofd/ofd_objects.c
lustre/osd-ldiskfs/osd_quota.c
lustre/ptlrpc/client.c