rdiff-backup-users
[Top][All Lists]
Advanced

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

Re: [rdiff-backup-users] Samba and archfs / fuse


From: Dominic
Subject: Re: [rdiff-backup-users] Samba and archfs / fuse
Date: Mon, 01 Dec 2008 15:22:55 +0000
User-agent: Thunderbird 2.0.0.18 (Windows/20081105)

cwilper wrote:
Hi Dominic and Andrew,

I've also been setting up archfs over samba and found this post helpful.  The 
final problem is actually that the st_nlink information is reported incorrectly 
(always zero) to fuse by archfs.  This causes samba clients to get confused.  
You can fix it by modifying revisions.c, starting at line 15.

Replace this:
        if (stats->type == S_IFDIR)
            stbuf->st_mode = stats->type | 0555;
        else
            stbuf->st_mode = stats->type | 0444;
        stbuf->st_nlink = stats->nlink;

With this:
        if (stats->type == S_IFDIR) {                
                           
            stbuf->st_mode = stats->type | 0555;
            stbuf->st_nlink = 2;
        } else {
            stbuf->st_mode = stats->type | 0444;
            stbuf->st_nlink = 1;
        }


Admittedly, this is a hack because I don't understand the real cause of the 
problem in the code.  But as long as directories are reported to have at least 
two links and files one, my samba client is happy.
Thanks Chris! That works well for me too. As your code did not come out too good in the posting I give it below in (hopefully) clearer form, for anyone else who wants to use it.

Dominic

               if (stats->type == S_IFDIR) {
                       stbuf->st_mode = stats->type | 0555;
                       stbuf->st_nlink = 2;
               } else {
                       stbuf->st_mode = stats->type | 0444;
                       stbuf->st_nlink = 1;
               }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]