Xavi/Ravi, Thanks for the inputs. After disabling all the performance xlators on the client side and attaching to brick daemons before actually mounting the gluster volume I was able to get in to posix_readv function. Thanks and Regards, Ram -----Original Message----- From: Xavier Hernandez [mailto:xhernandez@xxxxxxxxxx] Sent: Monday, October 17, 2016 3:02 AM To: Ankireddypalle Reddy; Ravishankar N; gluster-users@xxxxxxxxxxx Subject: Re: rot-13 Translator query Hi Ankireddypalle, On 16/10/16 11:10, Ankireddypalle Reddy wrote: > The encryption xlator is the last one before posix and it’s here that > the data is getting encrypted. When the data is read back the > encrypted data is returned. Decryption is supposed to happen in read > callback which does not seem to be happening. The fact that encrypted > data is getting returned indicates that data in turn is getting > returned from the posix/underlying fs layer. Is it possible that data > be returned by reading from the underlying fs by any translator other than posix. It could be because of quick-read translator. It caches some data from the beginning of files on lookups (even before an actual open and read is done on the file), so the first small read sent to the file could return cached data directly from what was obtained in the lookup fop without issuing a read fop. You would need to handle that case in lookup also. Anyway, to be sure you should do as Ravi has said and disable all performance xlators. In this case all reads should arrive as regular reads to your xlator. Xavi > > > > Thanks and Regards, > > Ram > > *From:*Ravishankar N [mailto:ravishankar@xxxxxxxxxx] > *Sent:* Sunday, October 16, 2016 12:19 AM > *To:* Ankireddypalle Reddy; gluster-users@xxxxxxxxxxx > *Subject:* Re: rot-13 Translator query > > > > On 10/15/2016 08:22 PM, Ankireddypalle Reddy wrote: > > Hi, > > I am trying to follow the below document for developing a > translator. > > > > https://github.com/gluster/glusterfs/blob/master/doc/developer-guide/t > ranslator-development.md > > > > I’ve created a replica volume and modified the vol file to > include rot-13 translator. Below is the snippet from vol file. > > > > volume myvol-posix > > type storage/posix > > option volume-id b492191e-77a5-4fc3-9394-49218e36dae2 > > option directory /brick1/repli > > end-volume > > > > volume *myvol-rot13* > > type encryption/rot-13 > > subvolumes *myvol-posix* > > end-volume > > > > volume myvol-trash > > type features/trash > > option trash-internal-op off > > option brick-path /brick1/repli > > option trash-dir .trashcan > > subvolumes *myvol-rot13* > > end-volume > > … > > > > The writes are getting intercepted by the translator and the file is > getting encrypted. But the reads don’t seem to be getting > intercepted by the translator. I tried setting break point in the > posix_readv function and attach the brick daemons to gdb. But > posix_readv does not seem to be getting called on the brick daemon > and the read completes on the application side. > > > > Can someone please explain how the reads are getting serviced here > without hitting the posix layer. > > It could be due to client side caching. I usually disable all > performance xlators (write-behind, read-head, io-cache, stat-prefetch, > quick-read, open-behind) when I want to remove caching effects while > debugging. drop-caches also helps. > > HTH, > Ravi > > > > > Thanks and Regards, > > Ram > > ***************************Legal Disclaimer*************************** > > "This communication may contain confidential and privileged material > for the > > sole use of the intended recipient. Any unauthorized review, use or > distribution > > by others is strictly prohibited. If you have received the message by > mistake, > > please advise the sender by reply email and delete the message. Thank you." > > ********************************************************************** > > > _______________________________________________ > > Gluster-users mailing list > > Gluster-users@xxxxxxxxxxx <mailto:Gluster-users@xxxxxxxxxxx> > > http://www.gluster.org/mailman/listinfo/gluster-users > > > > ***************************Legal Disclaimer*************************** > "This communication may contain confidential and privileged material > for the sole use of the intended recipient. Any unauthorized review, > use or distribution by others is strictly prohibited. If you have > received the message by mistake, please advise the sender by reply > email and delete the message. Thank you." > ********************************************************************** > > > _______________________________________________ > Gluster-users mailing list > Gluster-users@xxxxxxxxxxx > http://www.gluster.org/mailman/listinfo/gluster-users > ***************************Legal Disclaimer*************************** "This communication may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message by mistake, please advise the sender by reply email and delete the message. Thank you." ********************************************************************** _______________________________________________ Gluster-users mailing list Gluster-users@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-users