[Gluster-devel] Finalizing interfaces for snapshot and clone creation in BD xlator

Brian Foster bfoster at redhat.com
Wed Sep 25 12:50:47 UTC 2013


On 09/25/2013 12:27 AM, M. Mohan Kumar wrote:
> Here is the right link: http://review.gluster.org/#/c/5626/
> 

Thanks guys. I haven't taken a deep look at the code, but some initial
high-level comments...

The first thing I notice is that we take the opposite approach in the
associated qemu-block command. The target of the clone command is the
new file (referencing the source) rather than the original file passing
in a name of the target. Personally, I find the former more natural as a
core interface. The error handling is more straightforward (i.e.,
ENOENT) and it matches more closely with native primitives that provide
this kind of functionality (i.e., correct me if wrong, but I think we
observed that btrfs clone works via ioctl on the target fd, providing
the source fd as a parameter).

That said, I'm not sure if that is considered more user-friendly or not.
If that's a concern, could we change the low level interface to work as
described (i.e., user issues command on source file, high level code
converts into command on target file)? IOW, I think a nice goal going
forward would be to have the low level mechanisms standardize on some
kind of ioctl, and the higher level code become convenience commands
that simply exercise the ioctl (and what actually happens after that
depends on the type of file, what translators are loaded, etc.). I guess
that's hand wavy at the moment, but the idea is that all of this path
resolving and whatnot becomes generic and independent rather than
specific to and duplicated across each snapshot/clone mechanism we provide.

Secondarily, but somewhat related... does the path resolving code that
is there now have to be buried in fuse-bridge? Avati and I have briefly
discussed this idea of separating the management here into an
independent translator, and I think this falls in as a perfect candidate
for something like that. The resolving code is non-trivial, however, so
I'm not sure if there are serious technical hurdles for that kind of
approach. For example, is it possible/reasonable to push this into a new
translator beneath fuse (or perhaps library code?) and just skip linking
the inode into the parent table until/unless that happens naturally?
Thoughts?

Brian

> 
> On Wed, Sep 25, 2013 at 6:53 AM, M. Mohan Kumar <mohankumar.m at gmail.com>wrote:
> 
>>
>>
>> http://review.gluster.org/#/q/owner:%22M.+Mohan+Kumar+%253Cmohan%2540in.ibm.com%253E%22,n,z
>>
>> I also replied to your other comments.
>>
>>
>>
>>
>>
>> On Wednesday, September 25, 2013, Anand Avati <avati at gluster.org> wrote:
>>> Adding Brian Foster (and gluster-devel) for the discussion of unified UI
>> for snapshotting.
>>> Mohan, I must have missed your comment. Can you please point to the
>> specific patch where you posted your comment?
>>> Avati
>>>
>>> On Tue, Sep 24, 2013 at 9:29 AM, M. Mohan Kumar <mohankumar.m at gmail.com>
>> wrote:
>>>>
>>>> Hi Avati,
>>>> I am ready with V5 of BD xlator patches (I consolidated the patches to
>> 5). Before posting them I wanted your opinion about the interfaces I use
>> for creating clone and snapshot. I posted them on Gerrit few days back.
>> Could you please respond to that?
>>>>
>>>> --
>>>> Regards,
>>>> Mohan.
>>>
>>
>> --
>> Regards,
>> Mohan.
>>
> 
> 
> 





More information about the Gluster-devel mailing list