doubts in posix_handle_path and posix_handle_pump

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

 



hi Avati,
   Could you please explain why posix_handle_pump fixes ELOOP.

posix_handle_path seems to return gfid-path when the lstat on the base-gfid path fails. I am not sure what the behaviour is supposed to be.

I added the snippet of code for reference below.

346         base_len = (priv->base_path_length + SLEN(GF_HIDDEN_PATH) + 45);         
347         base_str = alloca (base_len + 1);                                        
348         base_len = snprintf (base_str, base_len + 1, "%s/%s/%02x/%02x/%s",       
349                              priv->base_path, GF_HIDDEN_PATH, gfid[0], gfid[1],  
350                              uuid_str);                                          
351                                                                                                                                                    
352         pfx_len = priv->base_path_length + 1 + SLEN(GF_HIDDEN_PATH) + 1;         
353                                                                                  
354         if (basename) {                                                          
355                 len = snprintf (buf, maxlen, "%s/%s", base_str, basename);       
356         } else {                                                                 
357                 len = snprintf (buf, maxlen, "%s", base_str);                    
358         }                                                                        
359                                                                                  
360         ret = lstat (base_str, &stat);                                           
361                                                                                  
362         if (!(ret == 0 && S_ISLNK(stat.st_mode) && stat.st_nlink == 1))          <<<-----
363                 goto out;                                                        

Pranith.
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.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