Subject: sleeping in VOP_READ/WRITE
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 02/17/1999 12:35:02
As some of you know, I'm working on a data migration file system, where
user files get migrated to tape after a certain amount of time. If a user
goes to read or write a file which has been moved to tape, the access
blocks and the process sleeps until the file is restored from tape.
Restoring from tape can sometimes take as long as 15 to 30 seconds.

My question is if I should sleep with the vnode for the file still locked.
It is locked when entering the VOP_READ/WRITE call. Would it be EVIL for
me to unlock it while sleeping, and then re-lock it before exiting?

Thoughts?

Take care,

Bill