From owner-freebsd-fs@FreeBSD.ORG Sun Nov 25 18:54: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 1A1B480F for ; Sun, 25 Nov 2012 18:54:06 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id A5E508FC13 for ; Sun, 25 Nov 2012 18:54:04 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id CCC82EE230A; Sun, 25 Nov 2012 19:46:56 +0100 (CET) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 11.0207] X-CRM114-CacheID: sfid-20121125_19465_904A01CB X-CRM114-Status: Good ( pR: 11.0207 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Sun Nov 25 19:46:56 2012 X-DSPAM-Confidence: 0.7607 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 50b267a02501889419329 X-DSPAM-Factors: 27, From*Attila Nagy , 0.00010, Subject*to+use, 0.00552, ZFS, 0.00613, Subject*ZFS, 0.00690, do+something, 0.00690, it's+not, 0.00719, Is+it, 0.00870, I'm+wondering, 0.00917, Date*Sun+25, 0.99000, buf, 0.01000, Received*Sun+25, 0.99000, it+fails, 0.01000, User-Agent*i686, 0.01156, User-Agent*Mozilla/5.0+(X11, 0.01156, fails, 0.01290, User-Agent*Linux+i686, 0.01290, will+it, 0.01370, I+guess, 0.01370, guess, 0.01520, Received*fs, 0.01562, User-Agent*i686+en, 0.01681, Received*fs+freebsd.org>, 0.01818, User-Agent*Linux, 0.01818, From*Attila, 0.01818, Subject*use, 0.01818, Received*; Sun, 25 Nov 2012 19:46:55 +0100 (CET) Message-ID: <50B2679E.3030600@fsn.hu> Date: Sun, 25 Nov 2012 19:46:54 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Is it possible to use ZFS transactions from user space? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Sun, 25 Nov 2012 18:54:06 -0000 Hi, I'm wondering, will it be possible to use ZFS transactions from user space? For example, I would like to do something similar: tx=zfs_tx_init(); write(fd,buf,strlen(buf)); unlink(file); zfs_tx_commit(tx); The write and unlink should both happen or fail together (it's fine with me if it fails only at tx_commit). I can see a lot of problems here, so I guess it's not an easy topic. Is it doable at all? Anyone working on it?