<div dir="ltr"><div><div><div>Dear Gluster Devels,<br><br></div>I want to read all the entries in a DIR inside of a xlator. For this purpose I use the syncop_readdir function which is also used in die self-heal functionality for example.<br></div>Here is a piece of code from inside the worm_rename function:<br><br><br> fd_t *fd = NULL;<br> gf_dirent_t entries;<br><br> fd = fd_anonymous (oldloc->inode);<br> if (fd == NULL) {<br> gf_log (this->name, GF_LOG_ERROR, "fd creation failed");<br> ret = -ENOMEM;<br> goto out;<br> }<br> INIT_LIST_HEAD (&entries.list);<br> ret = syncop_readdir (this, fd, 131072, 0, &entries, NULL, NULL);<br> if (ret) {<br> gf_log (this->name, GF_LOG_ERROR, "failed getting dir entries");<br> ret = -ENOMEM;<br> goto out;<br> }<br><br></div><div>The problem is, that I always get the Error:
"failed getting dir entries"
. It seems to be that there is something wrong with the execution of that function. Any ideas?<br><br></div><div>Regards<br></div><div>David Spisla<br></div></div>