From owner-freebsd-fs@FreeBSD.ORG Thu Jan 1 06:05:02 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57174106566C for ; Thu, 1 Jan 2009 06:05:02 +0000 (UTC) (envelope-from bryanalves@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2465F8FC19 for ; Thu, 1 Jan 2009 06:05:01 +0000 (UTC) (envelope-from bryanalves@gmail.com) Received: by wa-out-1112.google.com with SMTP id m34so3331870wag.27 for ; Wed, 31 Dec 2008 22:05:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=29whILwfCdWwyozBV0CQ9xf7WaiAY2AqWoGHRQk8PU0=; b=IrOHZP4XAtEQo1UfUKncn/mR7XBe+56aK0dXjKjiB0Ofjtvcmm2b9cqtUgy8l0riDE zuecGryQSAMTUelLZrUIhi8Yox/kXCvDTRqAMZMiwqyQh7/WitvTWeRIki53O8D2Sjda 3DjdIGWNSvtYfelSLpgIBt3eZ78VO9kgrZ7Ew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=N+mmsDp5Zp92HywPqb+xKAXU1I35NS983Mt5oyGGJy9s7b25vAVYCbeQUdzbVVeZJu +wZmIRAOWaWmbpUvczK4bFogxLo4gq1tS6zsdZkzT6VrgugIAAFfFkmMny7De4XRxm4z f1PQFy45QiuerTTwp40y0lV+F8F/9Ks8bXOHY= Received: by 10.114.102.1 with SMTP id z1mr10948669wab.186.1230789901099; Wed, 31 Dec 2008 22:05:01 -0800 (PST) Received: by 10.114.155.13 with HTTP; Wed, 31 Dec 2008 22:05:01 -0800 (PST) Message-ID: <92f477740812312205x554f06bbj4b3f7dcdbeb052f3@mail.gmail.com> Date: Thu, 1 Jan 2009 01:05:01 -0500 From: "Bryan Alves" To: freebsd-fs@freebsd.org In-Reply-To: MIME-Version: 1.0 References: <92f477740812291739o7c0b840bsd1cce4375577c41f@mail.gmail.com> <92f477740812301246k7ed77511oc969c22a3b5aad4d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: NFS locking problems with 7.0-RELEASE X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 06:05:02 -0000 On Wed, Dec 31, 2008 at 2:16 PM, Rick Macklem wrote: > > > On Tue, 30 Dec 2008, Bryan Alves wrote: > > - Download my server patches (ftp.cis.uoguelph.ca/pub/nfsv4/FreeBSD7) and >>> switch to using nfsv4, which has integral locking in the protocol. >>> >>> Have a good holiday, rick >>> >>> >>> Is there another location where I can get the nfs4 patches? That FTP >> seems >> to be down. >> >> Seems to be working here. Just "ftp ftp.cis.uoguelph.ca", login > "anonymous", then "cd pub/nfsv4/FreeBSD7". (Is it that you can't find > the machine? It's IP# is 131.104.48.112.) > > Also, outside the scope of this list, but since the discussion is opened, >> I >> might as well ask: >> >> If this NFS is the only remote mount that involves writing (it's opened >> read-only in other locations), and it's read/write locally, is it safe to >> use local locking? >> >> Yes, I believe so. Even if there are multiple clients rw mounting a file > system, local locking should be fine unless there are multiple clients > writing the same file in the file system. (With a single writer and > multiple readers, an application might run into coherency problems if > that application was written to use byte range locking to maintain > coherency (ie. most recently written data visible to the readers), but > that seems unlikely to matter for most applications/environments. (And > I'm not sure if the NLM is wired into NFS is such a way as to maintain > full coherency for the locked byte ranges anyhow, since normally NFS > does not maintain full coherency?) > > Have a happy new years, rick > > Well, I've upgraded to 7.1-RC2, in hopes that the kernel NFSLOCKD would make things better. Instead it made things worse. Now when locking fails, the system completely freezes, forcing a hard reset. There doesn't seem to be a way to turn off the kernel option anymore either (if you don't compile it in it's loaded on demand, and if it's not available because you move it, the kernel dies). I had some success turning off PF completely in getting NFS working, but even that has stopped now. I no longer have any idea what the problem is, nor do I have any other directions to diagnose it. Having the system completely lock up now makes most debugging efforts take extra long and makes them be a waste of time. I'm just going back to samba. I'll give up 20+ MB/s of throughput to have a working network-mounted home directory. From owner-freebsd-fs@FreeBSD.ORG Fri Jan 2 05:53:00 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D463106566B; Fri, 2 Jan 2009 05:53:00 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 628988FC1D; Fri, 2 Jan 2009 05:53:00 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n025r0e1093710; Fri, 2 Jan 2009 05:53:00 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n025r0L7093706; Fri, 2 Jan 2009 05:53:00 GMT (envelope-from linimon) Date: Fri, 2 Jan 2009 05:53:00 GMT Message-Id: <200901020553.n025r0L7093706@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-fs@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: bin/130105: [zfs] zfs send -R dumps core X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 05:53:01 -0000 Old Synopsis: [zfs] send -R dumpes core New Synopsis: [zfs] zfs send -R dumps core Responsible-Changed-From-To: freebsd-bugs->freebsd-fs Responsible-Changed-By: linimon Responsible-Changed-When: Fri Jan 2 05:52:37 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=130105 From owner-freebsd-fs@FreeBSD.ORG Fri Jan 2 11:27:06 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F1F106564A for ; Fri, 2 Jan 2009 11:27:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.rg) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 099578FC18 for ; Fri, 2 Jan 2009 11:27:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.rg) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 85ADA46B29; Fri, 2 Jan 2009 06:27:05 -0500 (EST) Date: Fri, 2 Jan 2009 11:27:05 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gerry Weaver In-Reply-To: <20081223201626.caa483ad@mail01.compvia.com> Message-ID: References: <20081223201626.caa483ad@mail01.compvia.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org Subject: Re: Headers files included by vnode.h X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 11:27:06 -0000 On Tue, 23 Dec 2008, Gerry Weaver wrote: > Perfect. Yes, I am building a kernel module. This is exactly what I was > looking for. I really appreciate your help. > > I am also trying to figure out a zero copy approach to kernel memory access > from user space. Would you happen to know which list I should post the > question to? Hi Gerry: It depends a bit what you want to accomplish with zero-copy. Are you just looking for a temporary mapping into kernel space for a user page, or a mapping of a kernel page into userspace? Is it only for use by privileged processes, or is this general-purpose? There are a number of concerns to think about, such as where the page comes from, whether leaked information that might also be present in the same page, if allocated from a general user of kernel pool, might be an issue, and how to tell when you're done with the page. If you just want a kernel facility to borrow a page from a user process temporarily, take a look at src/sys/net/bpf_zerocopy.c in 8.x, which borrows a set of user pages to use in-kernel for the duration of a BPF session. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-fs@FreeBSD.ORG Fri Jan 2 13:17:04 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABF64106566B for ; Fri, 2 Jan 2009 13:17:04 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (unknown [IPv6:2002:50b1:e8f2:1::143]) by mx1.freebsd.org (Postfix) with ESMTP id 66E098FC13 for ; Fri, 2 Jan 2009 13:17:04 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id ED8F23FAD; Fri, 2 Jan 2009 13:17:02 +0000 (GMT) Message-Id: <459358DB-15A6-4E27-A99E-D76A2A7DC73F@rabson.org> From: Doug Rabson To: Arnaud Houdelette In-Reply-To: <494F6C21.2000801@tzim.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 2 Jan 2009 13:17:02 +0000 References: <9461581F-F354-486D-961D-3FD5B1EF007C@rabson.org> <2F0DF92C-4240-48D4-9A5F-8B826D6D6E95@rabson.org> <87E89284-D3BF-4A5A-B6F7-C30709A3F2D9@lassitu.de> <4AC3BEB2-B47E-4280-85E1-C72891412D09@rabson.org> <494F6C21.2000801@tzim.net> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-fs@freebsd.org, Stefan Bethke Subject: Re: Booting from ZFS raidz X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 13:17:05 -0000 On 22 Dec 2008, at 10:29, Arnaud Houdelette wrote: > As I'm fairly interrested in this kind of setup, I set up a virtual > machine (VirtualBox) with 3 HD. > Sources are from a fresh current (csup yesterday). Applied your > patch successfully. > > Done a make installworld / installkernel to the zfs root. > Applied the bootcode as Stephan. > > The seem's the loader gets loaded, but it cant proceed further. > I got those kind of errors : I'm going to have to try and reproduce this but it looks as if you make have installed a gptzfsboot which doesn't include the raidz support. From owner-freebsd-fs@FreeBSD.ORG Sat Jan 3 18:21:10 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E4E11065673 for ; Sat, 3 Jan 2009 18:21:10 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from emh05.mail.saunalahti.fi (emh05.mail.saunalahti.fi [62.142.5.111]) by mx1.freebsd.org (Postfix) with ESMTP id 5B1DF8FC0C for ; Sat, 3 Jan 2009 18:21:10 +0000 (UTC) (envelope-from jh@saunalahti.fi) Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh05-2.mail.saunalahti.fi (Postfix) with SMTP id 4B9048C0FB for ; Sat, 3 Jan 2009 20:21:09 +0200 (EET) Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A0312D08B57; Sat, 03 Jan 2009 20:21:09 +0200 Received: from a91-153-125-115.elisa-laajakaista.fi (a91-153-125-115.elisa-laajakaista.fi [91.153.125.115]) by emh04.mail.saunalahti.fi (Postfix) with SMTP id 382E941BE5 for ; Sat, 3 Jan 2009 20:21:08 +0200 (EET) Date: Sat, 3 Jan 2009 20:21:08 +0200 From: Jaakko Heinonen To: freebsd-fs@freebsd.org Message-ID: <20090103182107.GA4119@a91-153-125-115.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Antivirus: VAMS Subject: [patch] ext2fs freeze/corruption on amd64 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 18:21:10 -0000 Hi, I can quite easily reproduce a hard freeze while writing to an ext2fs filesystem on amd64. I can reliably reproduce it by building a kernel with "make -j2" on ext2fs. This has been reported by other people too: http://lists.freebsd.org/pipermail/freebsd-fs/2008-March/004504.html http://lists.freebsd.org/pipermail/freebsd-bugs/2008-January/027555.html http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/119529 http://www.freebsd.org/cgi/query-pr.cgi?pr=amd64/99561 I tracked the problem down to find_next_zero_bit() in ext2_bitops.h. The bug doesn't affect i386 because it uses asm bitops from i386-bitops.h. (There's also sparc64-bitops.h file but it's not used anywhere.) The problem is that if the offset (ofs) has one or more of it's five low bits set those bits are incorrectly re-added to the result. With following patch applied I can't reproduce the problem. %%% Index: sys/gnu/fs/ext2fs/ext2_bitops.h =================================================================== --- sys/gnu/fs/ext2fs/ext2_bitops.h (revision 186639) +++ sys/gnu/fs/ext2fs/ext2_bitops.h (working copy) @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz mask = ~0U << (ofs & 31); bit = *p | ~mask; if (bit != ~0U) - return (ffs(~bit) + ofs - 1); + return (ffs(~bit) + (ofs & ~31U) - 1); p++; ofs = (ofs + 31U) & ~31U; } %%% I hope that someone would commit this or similar fix. It might be also reasonable to delete the unused sparc64-bitops.h file. -- Jaakko