All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: wip-libcephfs rebased and pulled up to v.65
       [not found]   ` <941FC8BE87ADE64D90E4EB6CD554517710023305@EPBYMINSA0032.epam.com>
@ 2013-07-11 19:01     ` Sage Weil
  2013-07-12  5:44       ` HA: " Ilya Storozhilov
  2013-07-12 11:23       ` Ilya Storozhilov
  0 siblings, 2 replies; 6+ messages in thread
From: Sage Weil @ 2013-07-11 19:01 UTC (permalink / raw)
  To: Ilya Storozhilov
  Cc: Adam C. Emerson, Matt W. Benjamin, David Zafman, ceph-devel

Please check out the current wip=libcephfs branch and let me know how it 
looks/works for you guys.  I cleaned up your patches a bit and fixed teh 
root cause of the xattr issue you were seeing.

Thanks!
sage


On Thu, 11 Jul 2013, Ilya Storozhilov wrote:

> Hi Adam (CC: Sage, Matt and David),
> 
> it seems to me we have choosen a bad commit description, where instead of "FIX: readlink not copy link path to user's buffer" there should be something like "FIX: ceph_ll_readlink() now fills user provided buffer with the link data instead of returning a pointer to the libcephfs internal memory location". Take a look to the sourcecode - it does actually what you are talking about (see https://github.com/ferustigris/ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc):
> 
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char *buf, size_t bufsiz, int uid, int gid)
> {
>   const char *value = NULL;
>   int res = (cmount->get_client()->ll_readlink(in, &value, uid, gid));
>   if (res < 0)
>     return res;
>   if (bufsiz < (size_t)res)
>     return ENAMETOOLONG;
>   memcpy(buf, value, res);  // <-- Here we are copying a link data to the user provided buffer. This is what you want us to do.
>   return res;
> }
> -----------------------------------------------------------------------
> 
> In your branch (see https://github.com/linuxbox2/linuxbox-ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc) this function does not copy link data to the user-provided buffer, but passes back a pointer to the internal libcephfs structure, which is not good solution, as you mentioned below:
> 
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char **value, int uid, int gid)
> {
>   return (cmount->get_client()->ll_readlink(in, (const char**) value, uid, gid));
> }
> -----------------------------------------------------------------------
> 
> Regards,
> Ilya
> 
> ________________________________________
> ??: Adam C. Emerson [aemerson@linuxbox.com]
> ??????????: 10 ???? 2013 ?. 20:41
> To: Ilya Storozhilov
> Cc: Sage Weil; Matt W. Benjamin; David Zafman
> ????: Re: wip-libcephfs rebased and pulled up to v.65
> 
> At Wed, 10 Jul 2013 12:17:24 +0000, Ilya Storozhilov wrote:
> [snip]
> > ?wip-libcephfs-rebased-v65? branch of the https://github.com/linuxbox2/linuxbox-ceph repository has not been branched from the ?wip-libcephfs? branch of https://github.com/ceph/ceph as it was made with our ?open_by_handle_api? branch of the https://github.com/ferustigris/ceph repo. That is why we were not able to automatically ?cherry-pick? our changes using respective git command. So we have manually applied our changes to the ?wip-libcephfs-rebased-v65? branch in https://github.com/ferustigris/ceph repo as one commit - you can check it out here: https://github.com/ferustigris/ceph/commit/c3f4940b2cfcfd3ea9a004e6f07f1aa3c0b6c419.
> [snip]
> 
> Good afternoon, sir.
> 
> I was looking at your patch and Matt and I have concerns about the
> change you made to readlink.  By passing back a pointer to a buffer
> rather than copying the link into a supplied buffer, we're opening
> ourselves up to the content changing, being deallocated, or otherwise
> having something bad happen to it.
> 
> Thanks.
> 
> 

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

* HA: wip-libcephfs rebased and pulled up to v.65
  2013-07-11 19:01     ` wip-libcephfs rebased and pulled up to v.65 Sage Weil
@ 2013-07-12  5:44       ` Ilya Storozhilov
  2013-07-12 11:23       ` Ilya Storozhilov
  1 sibling, 0 replies; 6+ messages in thread
From: Ilya Storozhilov @ 2013-07-12  5:44 UTC (permalink / raw)
  To: Sage Weil; +Cc: Adam C. Emerson, Matt W. Benjamin, David Zafman, ceph-devel

Hi Sage, Adam, Matt and David,

this branch is looking good at the first blush. We will check out how it works and report to you till the EOD.

Regards,
Ilya
________________________________________
От: Sage Weil [sage@inktank.com]
Отправлено: 11 июля 2013 г. 23:01
To: Ilya Storozhilov
Cc: Adam C. Emerson; Matt W. Benjamin; David Zafman; ceph-devel@vger.kernel.org
Тема: Re: wip-libcephfs rebased and pulled up to v.65

Please check out the current wip=libcephfs branch and let me know how it
looks/works for you guys.  I cleaned up your patches a bit and fixed teh
root cause of the xattr issue you were seeing.

Thanks!
sage


On Thu, 11 Jul 2013, Ilya Storozhilov wrote:

> Hi Adam (CC: Sage, Matt and David),
>
> it seems to me we have choosen a bad commit description, where instead of "FIX: readlink not copy link path to user's buffer" there should be something like "FIX: ceph_ll_readlink() now fills user provided buffer with the link data instead of returning a pointer to the libcephfs internal memory location". Take a look to the sourcecode - it does actually what you are talking about (see https://github.com/ferustigris/ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc):
>
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char *buf, size_t bufsiz, int uid, int gid)
> {
>   const char *value = NULL;
>   int res = (cmount->get_client()->ll_readlink(in, &value, uid, gid));
>   if (res < 0)
>     return res;
>   if (bufsiz < (size_t)res)
>     return ENAMETOOLONG;
>   memcpy(buf, value, res);  // <-- Here we are copying a link data to the user provided buffer. This is what you want us to do.
>   return res;
> }
> -----------------------------------------------------------------------
>
> In your branch (see https://github.com/linuxbox2/linuxbox-ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc) this function does not copy link data to the user-provided buffer, but passes back a pointer to the internal libcephfs structure, which is not good solution, as you mentioned below:
>
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char **value, int uid, int gid)
> {
>   return (cmount->get_client()->ll_readlink(in, (const char**) value, uid, gid));
> }
> -----------------------------------------------------------------------
>
> Regards,
> Ilya
>
> ________________________________________
> ??: Adam C. Emerson [aemerson@linuxbox.com]
> ??????????: 10 ???? 2013 ?. 20:41
> To: Ilya Storozhilov
> Cc: Sage Weil; Matt W. Benjamin; David Zafman
> ????: Re: wip-libcephfs rebased and pulled up to v.65
>
> At Wed, 10 Jul 2013 12:17:24 +0000, Ilya Storozhilov wrote:
> [snip]
> > ?wip-libcephfs-rebased-v65? branch of the https://github.com/linuxbox2/linuxbox-ceph repository has not been branched from the ?wip-libcephfs? branch of https://github.com/ceph/ceph as it was made with our ?open_by_handle_api? branch of the https://github.com/ferustigris/ceph repo. That is why we were not able to automatically ?cherry-pick? our changes using respective git command. So we have manually applied our changes to the ?wip-libcephfs-rebased-v65? branch in https://github.com/ferustigris/ceph repo as one commit - you can check it out here: https://github.com/ferustigris/ceph/commit/c3f4940b2cfcfd3ea9a004e6f07f1aa3c0b6c419.
> [snip]
>
> Good afternoon, sir.
>
> I was looking at your patch and Matt and I have concerns about the
> change you made to readlink.  By passing back a pointer to a buffer
> rather than copying the link into a supplied buffer, we're opening
> ourselves up to the content changing, being deallocated, or otherwise
> having something bad happen to it.
>
> Thanks.
>
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* wip-libcephfs rebased and pulled up to v.65
  2013-07-11 19:01     ` wip-libcephfs rebased and pulled up to v.65 Sage Weil
  2013-07-12  5:44       ` HA: " Ilya Storozhilov
@ 2013-07-12 11:23       ` Ilya Storozhilov
  2013-07-12 15:50         ` Sage Weil
  1 sibling, 1 reply; 6+ messages in thread
From: Ilya Storozhilov @ 2013-07-12 11:23 UTC (permalink / raw)
  To: Sage Weil; +Cc: Adam C. Emerson, Matt W. Benjamin, David Zafman, ceph-devel

Hi Sage, Adam, Matt and David,

we have resolved a couple of compilation issues in 'wip-libcephfs' branch and have created a respective pull request, see https://github.com/ceph/ceph/pull/424

Regards,
Ilya

P.S. I'm going on vacation for the next week, so keep connected with Andrey Kuznetsov (Andrey_Kuznetsov@epam.com) during this period, please.

________________________________________
От: Sage Weil [sage@inktank.com]
Отправлено: 11 июля 2013 г. 23:01
To: Ilya Storozhilov
Cc: Adam C. Emerson; Matt W. Benjamin; David Zafman; ceph-devel@vger.kernel.org
Тема: Re: wip-libcephfs rebased and pulled up to v.65

Please check out the current wip=libcephfs branch and let me know how it
looks/works for you guys.  I cleaned up your patches a bit and fixed teh
root cause of the xattr issue you were seeing.

Thanks!
sage


On Thu, 11 Jul 2013, Ilya Storozhilov wrote:

> Hi Adam (CC: Sage, Matt and David),
>
> it seems to me we have choosen a bad commit description, where instead of "FIX: readlink not copy link path to user's buffer" there should be something like "FIX: ceph_ll_readlink() now fills user provided buffer with the link data instead of returning a pointer to the libcephfs internal memory location". Take a look to the sourcecode - it does actually what you are talking about (see https://github.com/ferustigris/ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc):
>
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char *buf, size_t bufsiz, int uid, int gid)
> {
>   const char *value = NULL;
>   int res = (cmount->get_client()->ll_readlink(in, &value, uid, gid));
>   if (res < 0)
>     return res;
>   if (bufsiz < (size_t)res)
>     return ENAMETOOLONG;
>   memcpy(buf, value, res);  // <-- Here we are copying a link data to the user provided buffer. This is what you want us to do.
>   return res;
> }
> -----------------------------------------------------------------------
>
> In your branch (see https://github.com/linuxbox2/linuxbox-ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc) this function does not copy link data to the user-provided buffer, but passes back a pointer to the internal libcephfs structure, which is not good solution, as you mentioned below:
>
> -----------------------------------------------------------------------
> extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char **value, int uid, int gid)
> {
>   return (cmount->get_client()->ll_readlink(in, (const char**) value, uid, gid));
> }
> -----------------------------------------------------------------------
>
> Regards,
> Ilya
>
> ________________________________________
> ??: Adam C. Emerson [aemerson@linuxbox.com]
> ??????????: 10 ???? 2013 ?. 20:41
> To: Ilya Storozhilov
> Cc: Sage Weil; Matt W. Benjamin; David Zafman
> ????: Re: wip-libcephfs rebased and pulled up to v.65
>
> At Wed, 10 Jul 2013 12:17:24 +0000, Ilya Storozhilov wrote:
> [snip]
> > ?wip-libcephfs-rebased-v65? branch of the https://github.com/linuxbox2/linuxbox-ceph repository has not been branched from the ?wip-libcephfs? branch of https://github.com/ceph/ceph as it was made with our ?open_by_handle_api? branch of the https://github.com/ferustigris/ceph repo. That is why we were not able to automatically ?cherry-pick? our changes using respective git command. So we have manually applied our changes to the ?wip-libcephfs-rebased-v65? branch in https://github.com/ferustigris/ceph repo as one commit - you can check it out here: https://github.com/ferustigris/ceph/commit/c3f4940b2cfcfd3ea9a004e6f07f1aa3c0b6c419.
> [snip]
>
> Good afternoon, sir.
>
> I was looking at your patch and Matt and I have concerns about the
> change you made to readlink.  By passing back a pointer to a buffer
> rather than copying the link into a supplied buffer, we're opening
> ourselves up to the content changing, being deallocated, or otherwise
> having something bad happen to it.
>
> Thanks.
>
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: wip-libcephfs rebased and pulled up to v.65
  2013-07-12 11:23       ` Ilya Storozhilov
@ 2013-07-12 15:50         ` Sage Weil
  0 siblings, 0 replies; 6+ messages in thread
From: Sage Weil @ 2013-07-12 15:50 UTC (permalink / raw)
  To: Ilya Storozhilov
  Cc: Adam C. Emerson, Matt W. Benjamin, David Zafman, ceph-devel

On Fri, 12 Jul 2013, Ilya Storozhilov wrote:
> Hi Sage, Adam, Matt and David,
> 
> we have resolved a couple of compilation issues in 'wip-libcephfs' 
> branch and have created a respective pull request, see 
> https://github.com/ceph/ceph/pull/424

Thanks, i'll squash these down into the relevant commits.
> 
> Regards,
> Ilya
> 
> P.S. I'm going on vacation for the next week, so keep connected with Andrey Kuznetsov (Andrey_Kuznetsov@epam.com) during this period, please.
> 
> ________________________________________
> ??: Sage Weil [sage@inktank.com]
> ??????????: 11 ???? 2013 ?. 23:01
> To: Ilya Storozhilov
> Cc: Adam C. Emerson; Matt W. Benjamin; David Zafman; ceph-devel@vger.kernel.org
> ????: Re: wip-libcephfs rebased and pulled up to v.65
> 
> Please check out the current wip=libcephfs branch and let me know how it
> looks/works for you guys.  I cleaned up your patches a bit and fixed teh
> root cause of the xattr issue you were seeing.
> 
> Thanks!
> sage
> 
> 
> On Thu, 11 Jul 2013, Ilya Storozhilov wrote:
> 
> > Hi Adam (CC: Sage, Matt and David),
> >
> > it seems to me we have choosen a bad commit description, where instead of "FIX: readlink not copy link path to user's buffer" there should be something like "FIX: ceph_ll_readlink() now fills user provided buffer with the link data instead of returning a pointer to the libcephfs internal memory location". Take a look to the sourcecode - it does actually what you are talking about (see https://github.com/ferustigris/ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc):
> >
> > -----------------------------------------------------------------------
> > extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char *buf, size_t bufsiz, int uid, int gid)
> > {
> >   const char *value = NULL;
> >   int res = (cmount->get_client()->ll_readlink(in, &value, uid, gid));
> >   if (res < 0)
> >     return res;
> >   if (bufsiz < (size_t)res)
> >     return ENAMETOOLONG;
> >   memcpy(buf, value, res);  // <-- Here we are copying a link data to the user provided buffer. This is what you want us to do.
> >   return res;
> > }
> > -----------------------------------------------------------------------
> >
> > In your branch (see https://github.com/linuxbox2/linuxbox-ceph/blob/wip-libcephfs-rebased-v65/src/libcephfs.cc) this function does not copy link data to the user-provided buffer, but passes back a pointer to the internal libcephfs structure, which is not good solution, as you mentioned below:
> >
> > -----------------------------------------------------------------------
> > extern "C" int ceph_ll_readlink(struct ceph_mount_info *cmount, Inode *in, char **value, int uid, int gid)
> > {
> >   return (cmount->get_client()->ll_readlink(in, (const char**) value, uid, gid));
> > }
> > -----------------------------------------------------------------------
> >
> > Regards,
> > Ilya
> >
> > ________________________________________
> > ??: Adam C. Emerson [aemerson@linuxbox.com]
> > ??????????: 10 ???? 2013 ?. 20:41
> > To: Ilya Storozhilov
> > Cc: Sage Weil; Matt W. Benjamin; David Zafman
> > ????: Re: wip-libcephfs rebased and pulled up to v.65
> >
> > At Wed, 10 Jul 2013 12:17:24 +0000, Ilya Storozhilov wrote:
> > [snip]
> > > ?wip-libcephfs-rebased-v65? branch of the https://github.com/linuxbox2/linuxbox-ceph repository has not been branched from the ?wip-libcephfs? branch of https://github.com/ceph/ceph as it was made with our ?open_by_handle_api? branch of the https://github.com/ferustigris/ceph repo. That is why we were not able to automatically ?cherry-pick? our changes using respective git command. So we have manually applied our changes to the ?wip-libcephfs-rebased-v65? branch in https://github.com/ferustigris/ceph repo as one commit - you can check it out here: https://github.com/ferustigris/ceph/commit/c3f4940b2cfcfd3ea9a004e6f07f1aa3c0b6c419.
> > [snip]
> >
> > Good afternoon, sir.
> >
> > I was looking at your patch and Matt and I have concerns about the
> > change you made to readlink.  By passing back a pointer to a buffer
> > rather than copying the link into a supplied buffer, we're opening
> > ourselves up to the content changing, being deallocated, or otherwise
> > having something bad happen to it.
> >
> > Thanks.
> >
> >
> 
> 

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

* Re: HA: wip-libcephfs rebased and pulled up to v.65
  2013-07-03 11:17   ` HA: " Ilya Storozhilov
@ 2013-07-03 16:05     ` Sage Weil
  0 siblings, 0 replies; 6+ messages in thread
From: Sage Weil @ 2013-07-03 16:05 UTC (permalink / raw)
  To: Ilya Storozhilov; +Cc: Matt W. Benjamin, ceph-devel, aemerson, David Zafman

On Wed, 3 Jul 2013, Ilya Storozhilov wrote:
> Hi Sage,
> 
> Andrey has amended our changes according to you comments except one 
> regarding re-fetching xattrs from the MDS after setting or removal the 
> extended attribute of the filesystem object, cause it just requires some 
> resources we do not have at the moment (Andrey is sick till Thursday) - 
> you can check Andrey's commits here: 
> https://github.com/ferustigris/ceph/commits/open_by_handle_api. Other 
> staff, including xattrs unit tests have been implemented.
> 
> Does it possible to rebase our current changes on top of this and to 
> implement re-fetching of xattrs from MDS later, cause I suspect we are 
> not able to complete it till Monday?

Sounds good; just ping me when the rebased branch is there.  I think the 
xattr pieces can wait.

Thanks!
sage

> 
> Best regards,
> Ilya
> ________________________________________
> ??: Sage Weil [sage@inktank.com]
> ??????????: 3 ???? 2013 ?. 3:19
> To: Matt W. Benjamin; Ilya Storozhilov
> Cc: ceph-devel; aemerson; David Zafman
> ????: Re: wip-libcephfs rebased and pulled up to v.65
> 
> Hi Matt,
> 
> On Tue, 2 Jul 2013, Matt W. Benjamin wrote:
> > Hi Sage (et al),
> >
> > We have rebased the former wip-libcephfs branch, on the model of the
> > rebased example branch, as planned, and also pulled it up to Ceph's
> > v65 tag/master, also as planned.
> >
> > In addition to cross checking this, Adam has updated our Ganesha client
> > driver to use the ll v2 API, and this checks out.
> >
> > We've pushed wip-libcephfs-rebased-v65 to our public git repository,
> > https://github.com/linuxbox2/linuxbox-ceph, for review.
> 
> I made a couple comments on github with small nits.  In the meantime, I'm
> going to run this through our fs test suite.
> 
> Looks good!
> 
> Ilya, do you want to rebase your changes on top of this?  It would be
> great to get both sets of changes in before the dumpling feature freeze
> (Monday!).
> 
> Thanks!
> sage
> 
> 

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

* HA: wip-libcephfs rebased and pulled up to v.65
  2013-07-02 23:19 ` Sage Weil
@ 2013-07-03 11:17   ` Ilya Storozhilov
  2013-07-03 16:05     ` Sage Weil
  0 siblings, 1 reply; 6+ messages in thread
From: Ilya Storozhilov @ 2013-07-03 11:17 UTC (permalink / raw)
  To: Sage Weil, Matt W. Benjamin; +Cc: ceph-devel, aemerson, David Zafman

Hi Sage,

Andrey has amended our changes according to you comments except one regarding re-fetching xattrs from the MDS after setting or removal the extended attribute of the filesystem object, cause it just requires some resources we do not have at the moment (Andrey is sick till Thursday) - you can check Andrey's commits here: https://github.com/ferustigris/ceph/commits/open_by_handle_api. Other staff, including xattrs unit tests have been implemented.

Does it possible to rebase our current changes on top of this and to implement re-fetching of xattrs from MDS later, cause I suspect we are not able to complete it till Monday?

Best regards,
Ilya
________________________________________
От: Sage Weil [sage@inktank.com]
Отправлено: 3 июля 2013 г. 3:19
To: Matt W. Benjamin; Ilya Storozhilov
Cc: ceph-devel; aemerson; David Zafman
Тема: Re: wip-libcephfs rebased and pulled up to v.65

Hi Matt,

On Tue, 2 Jul 2013, Matt W. Benjamin wrote:
> Hi Sage (et al),
>
> We have rebased the former wip-libcephfs branch, on the model of the
> rebased example branch, as planned, and also pulled it up to Ceph's
> v65 tag/master, also as planned.
>
> In addition to cross checking this, Adam has updated our Ganesha client
> driver to use the ll v2 API, and this checks out.
>
> We've pushed wip-libcephfs-rebased-v65 to our public git repository,
> https://github.com/linuxbox2/linuxbox-ceph, for review.

I made a couple comments on github with small nits.  In the meantime, I'm
going to run this through our fs test suite.

Looks good!

Ilya, do you want to rebase your changes on top of this?  It would be
great to get both sets of changes in before the dumpling feature freeze
(Monday!).

Thanks!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-07-12 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <941FC8BE87ADE64D90E4EB6CD5545177100231F4@EPBYMINSA0032.epam.com>
     [not found] ` <78k3kyfjv2.wl%aemerson@linuxbox.com>
     [not found]   ` <941FC8BE87ADE64D90E4EB6CD554517710023305@EPBYMINSA0032.epam.com>
2013-07-11 19:01     ` wip-libcephfs rebased and pulled up to v.65 Sage Weil
2013-07-12  5:44       ` HA: " Ilya Storozhilov
2013-07-12 11:23       ` Ilya Storozhilov
2013-07-12 15:50         ` Sage Weil
2013-07-02 21:37 Matt W. Benjamin
2013-07-02 23:19 ` Sage Weil
2013-07-03 11:17   ` HA: " Ilya Storozhilov
2013-07-03 16:05     ` Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.