Writing a wtapper for BTRFS
Hi
where can I find some documentation that will help me in writing language bindings for BTRFS?
Thanks
Penn
Quoted 2 lines · On Wed, Feb 27, 2013 at 01:53:17PM +0100, [email protected] wrote:
where can I find some documentation that will help me in writing language bindings for BTRFS?
You may want to look at the btrfs-progs libify patches (posted to
this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs as a userspace C API.
You may also want to look at the bits I implemented in python[2]
for a subset of the btrfs ioctls and data structures in btrfs-gui.
Other than that, it's down to the data structures documentation on
the wiki[1], and reading through ioctl.h.
Hugo.
[1] https://btrfs.wiki.kernel.org/index.php/Data_Structures
[2] http://git.darksatanic.net/cgi/gitweb.cgi?p=btrfs-gui.git;a=blob;f=btrfsgui/btrfs.py;h=0941de1efeadb81576edf1c7c84da28805310a92;hb=aba25f9efe7bcdb99e8cfa38e703c4b0739c6af9
Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- Be pure. Be vigilant. Behave. --- Quoted 3 lines · Hugo Mills
You may want to look at the btrfs-progs libify patches (posted to
this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs as a userspace C API.
FYI, libify patch will be in the next integration branch.
Quoted 5 lines
You may also want to look at the bits I implemented in python[2]
for a subset of the btrfs ioctls and data structures in btrfs-gui.Other than that, it's down to the data structures documentation on
the wiki[1], and reading throughioctl.h.
bedup https://github.com/g2p/bedup does python binding, in a different way than btrfs-gui.
david
Quoted 7 lines · David Sterba
Quoted 3 lines · Hugo Mills
You may want to look at the btrfs-progs libify patches (posted to
this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs as a userspace C API.FYI, libify patch will be in the next integration branch.
Quoted 8 lines
Quoted 5 lines
You may also want to look at the bits I implemented in python[2]
for a subset of the btrfs ioctls and data structures in btrfs-gui.Other than that, it's down to the data structures documentation on
the wiki[1], and reading throughioctl.h.bedup https://github.com/g2p/bedup does python binding, in a different way than btrfs-gui.
Andy also mentioned being interested in language bindings of a libified btrfs-progs, cc:ing.
- z
Quoted 11 lines · Zach Brown
Quoted 10 lines · David Sterba
Quoted 3 lines · Hugo Mills
You may want to look at the btrfs-progs libify patches (posted to
this list in the last couple of months), which try to pull out the more useful bits of btrfs-progs as a userspace C API.FYI, libify patch will be in the next integration branch.
Quoted 3 lines
You may also want to look at the bits I implemented in python[2]
for a subset of the btrfs ioctls and data structures in btrfs-gui.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Other than that, it's down to the data structures documentation on
the wiki[1], and reading throughioctl.h.bedup https://github.com/g2p/bedup does python binding, in a different way than btrfs-gui.
Andy also mentioned being interested in language bindings of a libified btrfs-progs, cc:ing.
Yeah. Python/otherlang wrappers around a btrfs-progs C api seem preferable to each binding calling ioctls themselves, no? I think every common language is going to eventually want a btrfs lib.
-- Andy
Re: Writing a wrapper for BTRFS
In reply to Hugo MillsThanks for your replies.
Just so that I know what I am getting into if I decide to try writing Btrfs bindings, is this something that requires expertise of C on my part?
Supposing that I only need bindings for the most basic filesystem functionality, plus access to extended metadata, how long is this work going to take (considering that I have no prior experience with bindings)?
Thanks
Penn