Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp627539lqp; Thu, 21 Mar 2024 10:35:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjDyLzCXcXgvFJJdDbF2YV3BMXG1bbKiWetUIZu8Z/kDPlro6MC0hJSbYMEz/hRMz/DiZy8r9CXMs4e/+Bcat3P/Audtehitz/Pt4dMg== X-Google-Smtp-Source: AGHT+IEMLAn1tMc7wiw/Yb/OiPLi/y19+OTC2tr4kGHFCvRwfqrxMkAZUSPucAmC8yV4ziYMnvMJ X-Received: by 2002:a05:6a00:2195:b0:6e7:7ff1:d8d5 with SMTP id h21-20020a056a00219500b006e77ff1d8d5mr110009pfi.2.1711042527592; Thu, 21 Mar 2024 10:35:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711042527; cv=pass; d=google.com; s=arc-20160816; b=ALB1+vqIFihN3wzyc6zEzIOzGN5bW7tChYUDdFY3dtUN/SbdQtTDo2uG5E9gLTJYNH JbzGqDFq8mweJe1v5mcf7zh7UIsedAnk7GxlU4VkNyDIBHryLBAF+LbB34KwYzyDXoAQ SbZLs4f7BCjbdl3z3QOgGFEMQ/Ew4C9AeRqFkkV3Xe04MEc8tTCZfIzcMFYjtIeU2wZc pqHSmqiJvyQaipovw5g5aRwQ37K21GLOYIvNDs2LkLTeWZBPHsZ85LEgSUEYahKalNsg AGJt5eZ1iBB6rlMGrF3atRNXhzwJjHk2lswddsBhptEHjFi8pGOCGXXDY5JaI9WvQLlS 23qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=fmBaPoPHoOk2eYbse/SegtIYDiASxM261ecX77jbp2s=; fh=1nUm8zGcxrJ/jGhL7kcEOyI18GSCTUCfCQ85POdvrbI=; b=ZYzGo3h8oHnpiiZj1GIDRsNm76E6aAbakRPLCYKY6gl2er964EN7T6PoBJMwFAN5ob 36G+1GrZ3H7Q9pOYIiHS4p/hUHGsA1QMyKtYZoeFABTqhQOyxAgUpKxlrJgCHxMph/wK 7nfz5CVkNwJDMSeDfwxsZsl2saTJedfEbPSlYF2+CAxhOrnnmed1+oyoEgMYXvpNpdN2 jvJDPRsvHppp9wjX8dr3K8Vf/XbqBtu5G4Nge5RNJDrbgy+9Jm8jkail9x784ZoP18fG hPmrg1DJsv+O0vg7sGv1kxT0HuYn0HD83gyxYf9Ypm4x1Yi4rqGIT5fJewa87k9gddG4 7Uog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="ZwnVUT/e"; arc=pass (i=1 spf=pass spfdomain=pobox.com dkim=pass dkdomain=pobox.com dmarc=pass fromdomain=pobox.com); spf=pass (google.com: domain of linux-nfs+bounces-2436-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2436-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pobox.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o11-20020a62f90b000000b006e7821be94csi145606pfh.94.2024.03.21.10.35.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 10:35:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2436-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="ZwnVUT/e"; arc=pass (i=1 spf=pass spfdomain=pobox.com dkim=pass dkdomain=pobox.com dmarc=pass fromdomain=pobox.com); spf=pass (google.com: domain of linux-nfs+bounces-2436-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2436-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pobox.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1B9F1283898 for ; Thu, 21 Mar 2024 17:35:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4153516410; Thu, 21 Mar 2024 17:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="ZwnVUT/e" X-Original-To: linux-nfs@vger.kernel.org Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92F928592D; Thu, 21 Mar 2024 17:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.108.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711042526; cv=none; b=oRRffQ/GpjooewL00CpXSCj5ZRHRVdVmC0qQMlI5PkwfRNFhDkVAVtuTOE5QCq4aOR4ygK0k13bAIzivDn/mM6FhlnVU7ERcpLU+h87hN6xM624CQsE2i5M5698jchVE2FbX6gC6mw9eqmtxt0SteEjQ9KCDfWCH8a0y2MV6LjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711042526; c=relaxed/simple; bh=+uhI7J53JlvlWc/YQJLBFyTaJDV1zzxxVBCEtD/Z+E8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mKrayTxFI4Oy8u43bmdMZj/BbtHxfl0PB5AYZA5wq8I0lsshm12sd4QAjJgJfhgltm1Do+ZTpsZmbUOHvWY2NrBbs7B+uxnpP7GJBsdFk6Xat2pvNiq0sdPktWWuzLf1kl/oO/FKG62gUxsq/0neNmEC8PzkNwZxZwI9MMxkIZM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b=ZwnVUT/e; arc=none smtp.client-ip=64.147.108.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8D73A1EB8CA; Thu, 21 Mar 2024 13:35:21 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=+uhI7J53JlvlWc/YQJLBFyTaJDV1zzxxVBCEtD /Z+E8=; b=ZwnVUT/eHj+JnMlmyJhYCN3xEKKCcG5YAdsLs5HwfBnsirSxWhWjYY O+o6PM2suMInbKnilceZpAuV9FCYtYbAVOkZKRYSMGTpZHdM0X78DrUj8114JCSa im7GW1EcF5Ipj8Gfbj9vzMANSH1qfFgiLs2/DsjM3Avv8anxpJ7g8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 83AAE1EB8C8; Thu, 21 Mar 2024 13:35:21 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.125.139.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id E53101EB8C7; Thu, 21 Mar 2024 13:35:20 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Patrick Steinhardt Cc: git@vger.kernel.org, Chuck Lever , rsbecker@nexbridge.com, Jeff King , linux-nfs@vger.kernel.org Subject: Re: [PATCH] reftable: fix tests being broken by NFS' delete-after-close semantics In-Reply-To: <8ac5e94a3930cdd2aee9ea86acda3155674b635c.1711035529.git.ps@pks.im> (Patrick Steinhardt's message of "Thu, 21 Mar 2024 16:39:52 +0100") References: <8ac5e94a3930cdd2aee9ea86acda3155674b635c.1711035529.git.ps@pks.im> Date: Thu, 21 Mar 2024 10:35:19 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 641419CE-E7A9-11EE-9373-25B3960A682E-77302942!pb-smtp2.pobox.com Patrick Steinhardt writes: > while ((d = readdir(dir))) { > - if (!strcmp(d->d_name, "..") || !strcmp(d->d_name, ".")) > + /* > + * Besides skipping over "." and "..", we also need to > + * skip over other files that have a leading ".". This > + * is due to behaviour of NFS, which will rename files > + * to ".nfs*" to emulate delete-on-last-close. > + * > + * In any case this should be fine as the reftable > + * library will never write files with leading dots > + * anyway. > + */ > + if (starts_with(d->d_name, ".")) > continue; Sounds good. We should count what we positively consider what we wrote, not random cruft somebody else might have dropped in the directory, and this is a good first thing to do. Will queue. Thanks.