Whamcloud - gitweb
fix up file size and cache mechanisms to account for the disconnect between
authorzab <zab>
Wed, 2 Apr 2003 00:03:16 +0000 (00:03 +0000)
committerzab <zab>
Wed, 2 Apr 2003 00:03:16 +0000 (00:03 +0000)
commitcb47b974d0f14608f429985ef908b8fc015de2e2
tree47d536e278bb248ed40be96ccc9a7069dc6c0b94
parent0cc8e3e39a9419c026d1935a7c364e33015b3695
fix up file size and cache mechanisms to account for the disconnect between
acquiring a file region extent and getting 0..N callbacks for obd locks that
the acquiry generated.

- truncate_inode_pages(,0) could race with dirtying and lose data.  when a lock
  is canceled we now purge/invalidate the (striped) pages that were covered by
  the (lov->obd) lock
- remove the getattr flag business and instead do getattrs around every lock
  acquiry.  this brings us closer to how things will behave when we return
  file size with locks, but it will slow things down until then.
- maintain an rbtree of extents which record the page offsets that are dirty
  in the page cache.  for now it helps us decide if we should trust getattr.
  in the future it will help purging and the write space reservation.
- always round extents to page size in osc_enqueue
- while I'm in here, get rid of the ISBLK stuff in _file_write and let
  generic_file_write set ppos to i_size under the i_sem

this has passed tests under a large lov with /tmp backing, but do keep an eye
out for data/size inconsistency problems.
lustre/llite/iod.c