Whamcloud - gitweb
re-committing on b_devel:
authorphil <phil>
Thu, 25 Sep 2003 04:54:47 +0000 (04:54 +0000)
committerphil <phil>
Thu, 25 Sep 2003 04:54:47 +0000 (04:54 +0000)
commit161c7ffe93f5985ade87c44a786029c0d308a386
treea1dcf3034c0c0f46390c4bbb9a16da523b65de25
parent610a677c75f0cc43389f610af1c7e093c09500ed
re-committing on b_devel:
b=1997
r=alex
My previous fix for truncate/write lock inversion was close, but badly
flawed. I failed to remember that truncate will internally restart
the transaction -- start a new one, for all intents and purposes -- so
the ordering was backwards. "i_sem before transaction" is the
cardinal rule.

I tried to avoid that because I didn't want to hold the i_sem across
the entire disk I/O in filter_commitrw_write. After some discussion
with Alex, however, we decided that the i_sem need only be held for
the block allocation, and that the BKL suffices for updating i_size.
So the ordering in the write path is now: take i_sem, start transaction,
call filter_direct_io, f_d_io does block alloc, drops i_sem, does I/O.
lustre/obdfilter/filter_io_24.c