lock_kiovec question
lock_kiovec tries to lock each page in the kiovec, and fails if it can't lock one of the pages.
What if the zero page is mapped multiple times in the kiobuf?
AFAICS map_user_pages doesn't break zero page mappings if it's called with rw==WRITE (i.e write to disk, read from kiobuf)
--
Manfred
Quoted 2 lines · Manfred Spraul
lock_kiovectries to lock each page in the kiovec, and fails if it can't lock one of the pages.
lock_kiovec is dead code and should be deleted.
-ben
Hi,
Quoted 4 lines · Manfred Spraul
lock_kiovectries to lock each page in the kiovec, and fails if it can't lock one of the pages.What if the zero page is mapped multiple times in the kiobuf?
Don't Do That then. lock_kiobuf can be called if some caller really wants the kiobuf pages locked, but kiobuf page mapping is much cleaner in 2.4 than it had to be in 2.2 and there's no need to keep pages locked during the mapping. raw IO doesn't ever use lock_kiobuf in 2.4.
Quoted 2 lines
AFAICS
map_user_pagesdoesn't break zero page mappings if it's called with rw==WRITE (i.e write to disk, read from kiobuf)
Correct. The raw IO code for 2.2 had to exempt zero pages from locking for this reason.
Cheers,
Stephen