Re: cmds segfault on pdj-fstest (ceph.git unstable)

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

 



Thanks guys, fixed in 8be5b029d6dc4c5a1b6314eebf026907ccaf811a and
673fdc7aa29adb0826ad71b7c8faf32e1480267b.
(Would've just pushed yours, Harry, but I didn't see it in time -- sorry!)
-Greg

On Thu, Jun 10, 2010 at 4:38 AM, Henry C Chang
<henry_c_chang@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>>    add checks for being a snapshot root to dir_is_nonempty
>>
>> :040000 040000 6c45c68b84800b105299133374f0f91d82948659 2c1b290125ae435679ab29d6fbab7f5b8f81e4b9 M      src
>>
>
> I also got this segfault today. The segfault is caused by:
> _dir_is_nonempty() has already done reply_request(), but the caller,
> handle_client_unlink(), did it again.
>
> I suggest to move out reply_request() from _dir_is_nonempty(), and
> leave it to the caller.
> Maybe as below:
>
> Henry
>
>
> ===========================================
> diff --git a/src/mds/Server.cc b/src/mds/Server.cc
> index 29d0a32..4a90f4e 100644
> --- a/src/mds/Server.cc
> +++ b/src/mds/Server.cc
> @@ -3976,7 +3976,6 @@ bool Server::_dir_is_nonempty(MDRequest *mdr, CInode *in)
>               << dir->inode->get_projected_inode()->dirstat.size()
>               << " on " << *dir->inode
>               << dendl;
> -      reply_request(mdr, -ENOTEMPTY);
>       return true;
>     }
>
> @@ -4070,8 +4069,10 @@ void Server::handle_client_rename(MDRequest *mdr)
>     }
>
>     // non-empty dir?
> -    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin))
> +    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin)) {
> +      reply_request(mdr, -ENOTEMPTY);
>       return;
> +    }
>   }
>
>   // -- some sanity checks --
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux