Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A8EFC38D01F for ; Tue, 7 Apr 2026 23:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775605850; cv=none; b=Uy+P8iEqPda4HFieSuykc77xvCz1viqHoXUXEYc/4Y0VkDnitgX9PTURin7dYEm+Y78z6ztQnyNjadwTpQH0qcELD+GllGcZwvrA1kCB9lpY0wiuKlifAkXvlFlS5TtxcTXBsUfOn5XCUksKy4FqEo7u+UzJV2iwkZOaydAXNWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775605850; c=relaxed/simple; bh=qzIdTHiEYxQ7YS0jGp1wNy8FYlvRJLYa/QXi7dI4vO8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kq/qn/rfoKMuHiUUDtbyDCvHy2Jm0WLuQHOMA+UAkcCrk+wsexY0A0Ut7PISZfaoS0RJgGzV84QrhFWUqqyKnnLjvLHbIR1b3A6MEhxUxRhnwPv7ptwRCWZKc02RYQf7pPqb6y9LUgXX/g4IL3EQ6fzONhyMhWGt1uaADxsr7BQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QUqJ1o5K; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QUqJ1o5K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775605848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3iHLrkBlXXwgwBCVuTOvoC7MvSFAOlfFh7kOm+esMcw=; b=QUqJ1o5KXdRsaqIXSGaBBJ0CJyGEYB/UYT/cxgNUvdQNdKsQuHLC7X05+lZBHhBWJ2hlGT x/pvlI2zK7pGZLzO0VWp/exrCSyXOHRxBmChjDFCvSZhs579feCfOifhrzwIhYd8SJvpHU H4Pry2AFCZ7uuJc1crjCuKdYzi7K0CA= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-473-4QmLux_EMPKkuLeqpTrA0A-1; Tue, 07 Apr 2026 19:50:45 -0400 X-MC-Unique: 4QmLux_EMPKkuLeqpTrA0A-1 X-Mimecast-MFC-AGG-ID: 4QmLux_EMPKkuLeqpTrA0A_1775605844 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D7488195604F; Tue, 7 Apr 2026 23:50:43 +0000 (UTC) Received: from okorniev-mac.redhat.com (unknown [10.22.80.38]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B631B1955D84; Tue, 7 Apr 2026 23:50:42 +0000 (UTC) From: Olga Kornievskaia To: chuck.lever@oracle.com, jlayton@kernel.org Cc: linux-nfs@vger.kernel.org, neilb@brown.name, Dai.Ngo@oracle.com, tom@talpey.com Subject: [PATCH 2/3] nfsd: update mtime/ctime on synchronous COPY with delegated attributes Date: Tue, 7 Apr 2026 19:50:37 -0400 Message-ID: <20260407235038.55749-3-okorniev@redhat.com> In-Reply-To: <20260407235038.55749-1-okorniev@redhat.com> References: <20260407235038.55749-1-okorniev@redhat.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 COPY should update destination file's mtime/ctime upon completion. Signed-off-by: Olga Kornievskaia --- fs/nfsd/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index fb891e35ebe9..04d8d0d1ca7d 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2211,6 +2211,9 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, } else { status = nfsd4_do_copy(copy, copy->nf_src->nf_file, copy->nf_dst->nf_file, true); + if ((READ_ONCE(copy->nf_dst->nf_file->f_mode) & + FMODE_NOCMTIME) != 0) + nfsd_update_cmtime_attr(cstate->current_fh.fh_dentry); } out: trace_nfsd_copy_done(copy, status); -- 2.52.0