Re: Translator issue: Change content of iovec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Apr 3, 2017 at 10:38 AM, David Spisla <david.spisla@xxxxxxxxxxxx> wrote:

Dear GlusterDevels,

 

I am coding a translator which is changing the content of the iovec if a user wants to read the content of the original file. Imagine you have a simple text file with the content „hello“.

If the user wants to read that file, my translator changes the content to „I am the new content!!!“. But at the moment my translator is not working perfectly.

 

Original Content à„hello“

New content à „I am the new content!!!“

 

If I read that file I get à „I am “

It seems that there is still the old filesize allocated. I am looking for a way to allocate a new size so that my new String will fit into that file.

I tried out several things, but without success. Maybe someone of you has an idea. At the moment my translator is on the top of the client stack.

 

You find the source attached. I did all changes in à stub_readv_cbk

 



You would need to modify lookup_cbk in stub.c to indicate the appropriate meta data attributes for the file being read. Specifically, you would need to set ia_size in struct iatt.

HTH,
Vijay


 
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux