From owner-cvs-src Mon Mar 3 16:56:42 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 989CD37B401; Mon, 3 Mar 2003 16:56:39 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBD6243F75; Mon, 3 Mar 2003 16:56:38 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id D6AD22ED3D5; Mon, 3 Mar 2003 16:56:38 -0800 (PST) Date: Mon, 3 Mar 2003 16:56:38 -0800 From: Alfred Perlstein To: Jeff Roberson Cc: Jeff Roberson , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_default.c Message-ID: <20030304005638.GH43089@elvis.mu.org> References: <20030304003400.GG43089@elvis.mu.org> <20030303193715.N72102-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030303193715.N72102-100000@mail.chesapeake.net> User-Agent: Mutt/1.4i Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Jeff Roberson [030303 16:39] wrote: > On Mon, 3 Mar 2003, Alfred Perlstein wrote: > > > > > > > Modified files: > > > sys/kern vfs_default.c > > > Log: > > > - Correct the wchan in vop_stdfsync() > > > > > > This is almost what bde asked for. There is some desire to have per fs wchans > > > still but that is difficult giving the current arrangement of the code. > > > > not safe, but the general idea... > > > > char wchanstkbuf[7]; > > char *p = wchanstkbuf; > > > > sprintf(p, "%ssync", vp->v_type); > > > > Yeah, I was considering something along these lines. Unfortunately you're > likely to only get 2 characters of the filesystem type if you used "sync" > for the rest. This yields a potentially more effecient and safe > implementation: > > char wchanbuf[7] = " sync"; > wchanbuf[0] = vp->v_type[0]; > wchanbuf[1] = vp->v_type[1]; > > Looks good no? > > Maybe I'll check that in. Although I provided that intial suggestion I'm actually opposed to non-const strings being passed into tsleep. The reaon being, if someone gets a process wedged, it should be trivial to grep for the wchan that it's stuck in. Adding something like this, while pretty actually would make it harder to debug things later. While this one exception wouldn't be too bad I'm afraid it will lead to (un)clever abuses later. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message