ubik: remove unnecessary lseeks in uphys_open 71/12271/5
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 20 Apr 2016 22:17:16 +0000 (18:17 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 21 Sep 2018 02:50:03 +0000 (22:50 -0400)
commit6892bfbd701899281b34ee337637d438c7d8f8c6
tree3068f53f75627dfeba92937cefd48e5be0d29e76
parentda699c8b81e818ba97ff8115397d7f7afe0bf512
ubik: remove unnecessary lseeks in uphys_open

The ubik database file access layer has a file descriptor cache to avoid
reopening the database file on each file access.  However, the file
offset is reset with lseek on each and every use of the cached file
descriptor, and the file offset is set twice when reading or writing
data records.

This change removes unnecessary and duplicate lseek system calls to
reduce the system call load.

Change-Id: I460b226d81e4eb64dc87918175acab495aa698cd
Reviewed-on: https://gerrit.openafs.org/12271
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/ubik/phys.c