linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Writing a wtapper for BTRFS
@ 2013-02-27 12:53 penn43
  2013-02-27 13:08 ` Hugo Mills
  0 siblings, 1 reply; 6+ messages in thread
From: penn43 @ 2013-02-27 12:53 UTC (permalink / raw)
  To: linux-btrfs

Hi

where can I find some documentation that will help me
in writing language bindings for BTRFS?

Thanks

Penn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing a wtapper for BTRFS
  2013-02-27 12:53 Writing a wtapper for BTRFS penn43
@ 2013-02-27 13:08 ` Hugo Mills
  2013-02-27 15:19   ` David Sterba
  2013-02-28 13:43   ` Writing a wrapper " penn43
  0 siblings, 2 replies; 6+ messages in thread
From: Hugo Mills @ 2013-02-27 13:08 UTC (permalink / raw)
  To: penn43; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]

On Wed, Feb 27, 2013 at 01:53:17PM +0100, penn43@gmx.com 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

-- 
=== 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. ---                  

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing a wtapper for BTRFS
  2013-02-27 13:08 ` Hugo Mills
@ 2013-02-27 15:19   ` David Sterba
  2013-02-27 21:34     ` Zach Brown
  2013-02-28 13:43   ` Writing a wrapper " penn43
  1 sibling, 1 reply; 6+ messages in thread
From: David Sterba @ 2013-02-27 15:19 UTC (permalink / raw)
  To: Hugo Mills, penn43, linux-btrfs

On Wed, Feb 27, 2013 at 01:08:46PM +0000, Hugo Mills wrote:
>    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.

>    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.

bedup https://github.com/g2p/bedup does python binding, in a different
way than btrfs-gui.

david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing a wtapper for BTRFS
  2013-02-27 15:19   ` David Sterba
@ 2013-02-27 21:34     ` Zach Brown
  2013-02-27 22:48       ` Andy Grover
  0 siblings, 1 reply; 6+ messages in thread
From: Zach Brown @ 2013-02-27 21:34 UTC (permalink / raw)
  To: dsterba, Hugo Mills, penn43, linux-btrfs; +Cc: Andy Grover

On Wed, Feb 27, 2013 at 04:19:57PM +0100, David Sterba wrote:
> On Wed, Feb 27, 2013 at 01:08:46PM +0000, Hugo Mills wrote:
> >    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.
> 
> >    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.
> 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing a wtapper for BTRFS
  2013-02-27 21:34     ` Zach Brown
@ 2013-02-27 22:48       ` Andy Grover
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Grover @ 2013-02-27 22:48 UTC (permalink / raw)
  To: Zach Brown; +Cc: dsterba, Hugo Mills, penn43, linux-btrfs

On 02/27/2013 01:34 PM, Zach Brown wrote:
> On Wed, Feb 27, 2013 at 04:19:57PM +0100, David Sterba wrote:
>> On Wed, Feb 27, 2013 at 01:08:46PM +0000, Hugo Mills wrote:
>>>     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.
>>
>>>     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.
>>
>> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Writing a wrapper for BTRFS
  2013-02-27 13:08 ` Hugo Mills
  2013-02-27 15:19   ` David Sterba
@ 2013-02-28 13:43   ` penn43
  1 sibling, 0 replies; 6+ messages in thread
From: penn43 @ 2013-02-28 13:43 UTC (permalink / raw)
  To: linux-btrfs

Thanks 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-28 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 12:53 Writing a wtapper for BTRFS penn43
2013-02-27 13:08 ` Hugo Mills
2013-02-27 15:19   ` David Sterba
2013-02-27 21:34     ` Zach Brown
2013-02-27 22:48       ` Andy Grover
2013-02-28 13:43   ` Writing a wrapper " penn43

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).