1.1 --- a/libfsserver/lib/generic/accessor.cc Sun Apr 18 00:27:43 2021 +0200
1.2 +++ b/libfsserver/lib/generic/accessor.cc Sun Apr 18 22:31:55 2021 +0200
1.3 @@ -25,8 +25,8 @@
1.4
1.5
1.6
1.7 -Accessor::Accessor(fileid_t fileid, offset_t size)
1.8 -: _size(size), fileid(fileid)
1.9 +Accessor::Accessor(fileid_t fileid)
1.10 +: fileid(fileid)
1.11 {
1.12 }
1.13
1.14 @@ -34,20 +34,6 @@
1.15 {
1.16 }
1.17
1.18 -/* Return the size of the file. */
1.19 -
1.20 -offset_t Accessor::get_size()
1.21 -{
1.22 - return _size;
1.23 -}
1.24 -
1.25 -/* Update the size of the file. */
1.26 -
1.27 -void Accessor::set_size(offset_t size)
1.28 -{
1.29 - _size = size;
1.30 -}
1.31 -
1.32 /* Perform any closing operation on the file. */
1.33
1.34 void Accessor::close()
1.35 @@ -68,7 +54,7 @@
1.36 flexpage. This could potentially be a shared read-only flexpage that
1.37 would be replaced by an independent writable flexpage if ever written. */
1.38
1.39 - if (flexpage->base_offset < _size)
1.40 + if (flexpage->base_offset < get_size())
1.41 fill_populated(flexpage);
1.42 else
1.43 memset((void *) flexpage->base_addr, 0, flexpage->size);
1.44 @@ -79,7 +65,7 @@
1.45 /* Flushing completely beyond the end of file should discard the
1.46 flexpage. */
1.47
1.48 - if (flexpage->base_offset < _size)
1.49 + if (flexpage->base_offset < get_size())
1.50 flush_populated(flexpage);
1.51 }
1.52