Subject: Re: Proposal: File system suspension - prerequisite for snapshots
To: None <tech-kern@netbsd.org>
From: Frank van der Linden <fvdl@netbsd.org>
List: tech-kern
Date: 08/12/2003 23:04:50
On Tue, Aug 12, 2003 at 10:45:13PM +0200, Juergen Hannken-Illjes wrote:
> if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
> return (error);
> do_the_write_operation
> vn_finished_write(mp);
>
> or
>
> restart:
> prepare_a_write_operation
> if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) {
> abort_current_preparation
> if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0)
> return (error);
> goto restart;
> }
> do_the_write_operation
> vn_finished_write(mp);
I proposed a VOP_THROTTLE for something like this a long time ago.
It never made it, but I think throttling mechanisms can be built in
to this, and it can be used for a more generic snapshot solution
too. So, I support adding an interface like this.
- Frank