xfs
[Top] [All Lists]

Re: duplicate code in dir2

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: Re: duplicate code in dir2
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 22 Jun 2011 10:25:43 -0500
In-reply-to: <4E020912.9020106@xxxxxxxxxxx>
References: <4E020912.9020106@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
Another interesting chunk elsewhere:

/src/git/linux-2.6/fs/xfs/xfs_da_btree.c(782)
/src/git/linux-2.6/fs/xfs/xfs_attr_leaf.c(1542)
                *action = 0;
                return(0);
        if (count == 0) {
                forward = (info->forw != 0);
                memcpy(&state->altpath, &state->path, sizeof(state->path));
                error = xfs_da_path_shift(state, &state->altpath, forward,
                                                 0, &retval);
                if (error)
                        return(error);
                if (retval) {
                        *action = 0;
                } else {
                        *action = 2;
                return(0);
        forward = (be32_to_cpu(info->forw) < be32_to_cpu(info->back));
        for (i = 0; i < 2; forward = !forward, i++) {
                if (forward)
                        blkno = be32_to_cpu(info->forw);
                else
                        blkno = be32_to_cpu(info->back);
                if (blkno == 0)
                        continue;
                error = xfs_da_read_buf(state->args->trans, state->args->dp,

/src/git/linux-2.6/fs/xfs/xfs_da_btree.c(842)
/src/git/linux-2.6/fs/xfs/xfs_attr_leaf.c(1605)
                        break;
        if (i >= 2) {
                *action = 0;
                return(0);
        memcpy(&state->altpath, &state->path, sizeof(state->path));
        if (blkno < blk->blkno) {
                error = xfs_da_path_shift(state, &state->altpath, forward,
                                                 0, &retval);

<Prev in Thread] Current Thread [Next in Thread>