gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] self heal problem


From: Stephan von Krawczynski
Subject: Re: [Gluster-devel] self heal problem
Date: Wed, 24 Mar 2010 16:17:25 +0100

On Wed, 24 Mar 2010 08:46:37 -0600 (CST)
"Tejas N. Bhise" <address@hidden> wrote:

> Hi Stephan,
> [...]
> If not hand crafted, then please give the detailed testcase which can 
> lead to this situation based on just filesize.

Yet again, lets make the situation completely clear and transparent:
Is it true that there is code inside the fs (be it the one I pointed to or
elsewhere) that influences a self-heal decision based on the file size?

What is the use of this code concerning self heal:

static int
afr_sh_mark_biggest_as_source (afr_self_heal_t *sh, int child_count)
{
        int biggest = 0;
        int i;
   
        for (i = 0; i < child_count; i++) {
                if (SIZE_GREATER (&sh->buf[i], &sh->buf[biggest])) {
                        biggest = i;
                }
        }
 
        sh->sources[biggest] = 1;

        return 1;
}

xlators/cluster/afr/src/afr-self-heal.h:
#define SIZE_GREATER(buf1,buf2) ((((struct stat *)buf1)->st_size > (((struct 
stat *)buf2)->st_size)))

--
Regards,
Stephan






reply via email to

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