From owner-freebsd-fs@FreeBSD.ORG Sat Nov 3 20:56:06 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3771B417 for ; Sat, 3 Nov 2012 20:56:06 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id DE8D78FC16 for ; Sat, 3 Nov 2012 20:56:05 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so5783046obb.13 for ; Sat, 03 Nov 2012 13:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ofxwR4Xsm4tzscJvxTSDymE3G6PnLVDwdc7hl5SKQeo=; b=FHShCZ6ti8nDFX0skIwsDHX6fcESG/E03Kou6ywIXueNEnb5KrJ1cETbkSZ9SmTqYE Rir8X3RcVM9NzV5YortzpJFJjw+jbMRuRYMajWI+CUVEhm/s4vdw7i6NX2/7pC7EpU/I seIxW5XLZDKLFqjmYu0WKg/mtxzlh9l6OVPZwyCCHX8wM6qLfAI5Ecw1JzuwgTVU9jVo KpUTvxEv7pD5borsSL7pzgE7o4U2O/dcjzZD3iagoW4F+e8N2bKV0xQjdvvb6dSIWPHg 55zNsXue4j0sJx+0K/TXT3Zkg42HsdGkJptgVW35PYundbUJHfGJLy/+n8FxJHOrMn1F NXOA== MIME-Version: 1.0 Received: by 10.60.169.170 with SMTP id af10mr4487622oec.17.1351976164997; Sat, 03 Nov 2012 13:56:04 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Sat, 3 Nov 2012 13:56:04 -0700 (PDT) In-Reply-To: <20121103103849.GD12996@server.rulingia.com> References: <20121103103849.GD12996@server.rulingia.com> Date: Sat, 3 Nov 2012 13:56:04 -0700 Message-ID: Subject: Re: Inconsistent/potentially incorrect behavior with relative lookups via chdir(2) on UFS/ZFS From: Garrett Cooper To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD FS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2012 20:56:06 -0000 On Sat, Nov 3, 2012 at 3:38 AM, Peter Jeremy wrote: > On 2012-Nov-01 15:25:05 -0700, Garrett Cooper wrote: > > Just doing some interop testing on UFS/ZFS to develop a baseline for > >filesystem behavior, and I noticed some inconsistencies with the ENOENT > >requirement in chdir(2) when dealing with relative ".." paths (dot-dot > >lookups). In particular... > > 1. I would have expected chdir('.') to have failed in UFS/ZFS with > >ENOENT if '.' wasn't present, but it didn't. > > 2. I would have expected chdir('..') to have failed in ZFS with ENOENT > >if '..' wasn't present, but it didn't. > > Sidenote: python doesn't do any special handling with os.chdir, per > >Modules/posixmodule.c (I checked). > > The full test I ran is included below. > > Whilst playing with the above, I've found some wierd timing issues > with UFS+SU: > > $ mkdir -p ~/p/q/r;sync > $ cd p/q/r > $ rm -r ~/p; while date; do sleep 3 ; ls -al;done > Sat 3 Nov 2012 21:29:19 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:22 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:25 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:28 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:31 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:34 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:37 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:40 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:43 EST > total 2 > drwxr-xr-x 0 peter jeremy 512 3 Nov 21:28 . > drwxr-xr-x 0 peter jeremy 0 3 Nov 21:29 .. > Sat 3 Nov 2012 21:29:46 EST > total 0 > Sat 3 Nov 2012 21:29:49 EST > Interesting; with SU-J or SUJ (my testing was with the default: SUJ)? Thanks! -Garrett