From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?=
Subject: exchangedata vfs call to support atomic updates
Date: Fri, 06 Jun 2014 01:32:15 +0100
Message-ID: <53910C0F.3080000@draigBrady.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
To: Linux FS Devel
Return-path:
Received: from mail2.vodafone.ie ([213.233.128.44]:52952 "EHLO
mail2.vodafone.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1751384AbaFFAl4 (ORCPT
);
Thu, 5 Jun 2014 20:41:56 -0400
Sender: linux-fsdevel-owner@vger.kernel.org
List-ID:
I was looking recently and the common task of editing file,
while trying to satisfy some of the ACID properties.
Atomicity and Consistency are very common requirements
and can be achieved by rename(tmp, orig) instead of open(orig, O_TRUNC)=
+write().
However the downside of that is the awkwardness of maintaining
metadata on the tmp file, some of which is impossible to maintain for n=
on root users.
OSX has the exchangedata(orig, tmp) call to cater to this problem which
would just switch the referenced data while maintaining the orig metada=
ta.
So I was wondering about the feasibility of providing that interface,
or whether any existing interface caters to that use case?
I see XFS has XFS_IOC_SWAPEXT and ext4 has EXT4_IOC_MOVE_EXT
which could be useful to implement this?
thanks,
P=C3=A1draig.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel=
" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html