Using syncop_readdir inside Xlator

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

 



Dear Gluster Devels,

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.
Here is a piece of code from inside the worm_rename function:


               fd_t                 *fd             = NULL;
               gf_dirent_t           entries;

                fd = fd_anonymous (oldloc->inode);
                if (fd == NULL) {
                        gf_log (this->name, GF_LOG_ERROR, "fd creation failed");
                        ret = -ENOMEM;
                        goto out;
                }
                INIT_LIST_HEAD (&entries.list);
                ret = syncop_readdir (this, fd, 131072, 0, &entries, NULL, NULL);
                if (ret) {
                        gf_log (this->name, GF_LOG_ERROR, "failed getting dir entries");
                        ret = -ENOMEM;
                        goto out;
               }

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?

Regards
David Spisla
_______________________________________________
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