Date: Sun, 14 Jan 2007 11:53:37 +0200 From: Danny Braniss <danny@cs.huji.ac.il> To: Scott Long <scottl@samsco.org> Cc: Wilko Bulte <wb@freebie.xs4all.nl>, Pawel Jakub Dawidek <pjd@freebsd.org>, freebsd-hackers@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: iSCSI disconnects dilema Message-ID: <E1H623V-0008yq-Dl@cs1.cs.huji.ac.il> In-Reply-To: <45A91A02.906@samsco.org> References: <E1H5S7E-000BS0-RR@cs1.cs.huji.ac.il> <20070112195549.GA77181@freebie.xs4all.nl> <45A7F6A4.4030707@samsco.org> <E1H5ftb-000Okd-FO@cs1.cs.huji.ac.il> <45A91A02.906@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
... > > So you had a scenario where a program was doing I/O right up to system > (initiator) shutdown, and some of those I/O's got lost in the process? > I guess I don't understand why the OS didn't flush all outstanding I/O > buffers after terminating the program and before finishing the shutdown. > Maybe you are doing something illegal in your driver, or maybe you need > to implement a kernel shutdown hook that will allow you to block the > shutdown until everything is flushed. > the problem was solved! it just took me a while to find the cause :-) the driver picks the fd/socket from userland, via fgetsock(...), this increases the socket usage count, which I wrongly believed would save me from the userland exiting. a call to fget(...) now solves this, and so shutdown can now flush all iscsi buffers, and fsck'in is not necesary on reboot. danny > Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1H623V-0008yq-Dl>