[Gluster-users] Getting md5 check of a file through libglusterfs

Angel clist at uah.es
Sun Jan 24 11:49:35 UTC 2010


Hi

many many versions ago, i was following the list closely. There were a new 
world of posible hacks with the xlator concept. 

transparent hashing was one of them. Unfortunately Gluster guys were to busy 
with the self-healing and cluster features son i didnt eventry to send a 
patch, and my code was terrible bad (but just functional).

Even i tried to help on a quota xlator with varing success (i was able to use 
it in-house) but was incomplete to be accepted so eventually lost hype and got 
other things to care of... 


So I was able to play with:

struct xlator_fops fops = {
        ....
        ....
        .setxattr    = filter_setxattr,
        .getxattr    = filter_getxattr,



to create a virtual xttar md5 so when accesed you get in fact a md5 sum of the 
whole file. Dont remmeber where the code is but you should be able to 
reimplement this with the list help.

the plain case is trivial, then youll have to refine and improve support for 
opened files, automatic rehashing on close, and partial rehasing for append-
only files etc... Being a xlator you can place directly over storage 
translators like posix-storage and minimize the plethora of cases to care of 
and the bandwitch usage.. More avanced uses include hashing on writes.


Place it over lock translator if you want leverage locking while hashing.

Actually Im talking you from my GlusterFS 1.X memories but it seems that 
GlusterFS 3.x is not so diferent.  The same good ideas, a lot of better code.


Congratulations Gluster guys, keep the good work!!

/Angel


On Sábado, 23 de Enero de 2010 09:36:45 Tejas N. Bhise escribió:
> Hi Dongmin,
> 
> Can you elaborate what what you are trying to achieve so we get a better
>  understanding of the problem.
> 
> Regards,
> Tejas.
> 
> ----- Original Message -----
> From: "Dongmin Yu" <min at hostway.co.kr>
> To: gluster-users at gluster.org
> Sent: Saturday, January 23, 2010 1:57:09 PM GMT +05:30 Chennai, Kolkata,
>  Mumbai, New Delhi Subject: [Gluster-users] Getting md5 check of a file
>  through libglusterfs
> 
>  
> 
> Hello,
> 
>  
> 
> Is there an easier way to get md5 checksum of a file through
> libglusterfs?
> 
> Sure we could get this value with a standard md5sum command line on the
> fuse mounted system. If I read all the contents and calculate md5
> checksum, it would be very time/network consuming job.
> 
>  
> 
> Thanks
> 
>  
> 
> DongMin Yu
> 
>  
> 
> HOSTWAY IDC Corp. / R&D Principal Researcher
> 
> TEL. +822 2105 6037
> 
> FAX. +822 2105 6019
> 
> CELL. +8216 2086 1357
> 
> EMAIL: min.yu at hostwaycorp.com
> 
> Website: http://www.hostway.com
> 
>  
> 
> NOTICE:  This email and any file transmitted are confidential and/or
> legally privileged and intended only for the person(s) directly
> addressed.  If you are not the intended recipient, any use, copying,
> transmission, distribution, or other forms of dissemination is strictly
> prohibited.  If you have received this email in error, please notify the
> sender immediately and permanently delete the email and files, if any.
> 
> 
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
> 

-- 
Most people know C is not so high level....
                ...Everybody else just got assembler overdose
 



More information about the Gluster-users mailing list