Whamcloud - gitweb
LU-13309 ofd: optimize the brw codepath 95/37795/3
authorAndrew Perepechko <c17827@cray.com>
Fri, 13 Mar 2020 09:44:24 +0000 (12:44 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 Mar 2020 07:01:07 +0000 (07:01 +0000)
commit3beeb90cfa47b4753083d09760a6bd5ecaf58d76
treea66c7316ee1f740fd62608b701e8fa3e0efa349a
parent8ccaed513006f0582578ff42c9917b5aa76f2f4b
LU-13309 ofd: optimize the brw codepath

1) currently, ofd_commitrw() calls lvbo_update()
from the read path with req == NULL.

The only effect of this call is lvb update from
disk. However, the read request does not update
inode info such as atime/mtime/ctime/i_size, so
there's no need for lvb update.

The comment above the removed code claims that
ofd_preprw_read() updated ondisk atime. In fact,
there's no code in the read path which updates
atime. Atime update was implemented by
obdo_to_inode() before we moved to osd.

We don't seem to suffer from this loss, so
attr_get and lvb update, which currently do nothing,
can be simply dropped.

2) ofd_commitrw_*() calls ofd_object_find()
whereas the corresponding preprw call has not
only received the pointer to the object, but
also keeps a reference on it when exits so
ofd_commitrw_*() has to put it twice.

We don't really need to look up the needed
object twice, just record it in the ofd info
and then take it from there.

Change-Id: If9692906e6c8c4e1254d166620d1ea7e68a933b6
Signed-off-by: Andrew Perepechko <c17827@cray.com>
Cray-bug-id: LUS-8127
Reviewed-on: https://review.whamcloud.com/37795
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_io.c