On Thu, Apr 14, 2011 at 2:46 AM, huang jun <hjwsm1989@xxxxxxxxx> wrote: > hi developers, > I have a question about the prealloc_inos variable in SessionMap.h > when the client first request to allocate an inode, > prepare_new_inode function will prepare new inodes to the session. so > if the client's first request is to make a dir, the MDS always > return a safe message to the client, but why it do not answer > unsafe to th client? The point of preallocating inode numbers is so that the MDS can return success to the client without having to wait for a disk access. It does these by writing to disk that the preallocated inodes belong to the client before the client asks for them -- this way even if there is a crash of some kind nobody else will try and claim the preallocated inode numbers. > i want to prepare new inodes to the session in > handle_client_stat,can i do that? in other words, should i allocate > inodes when client mounted on the ceph cluster? I'm not quite sure what you're saying -- you want to allocate a new inode when the client does a stat? Generally whatever you want to do you should try and reuse the existing machinery to prevent code replication... -Greg -- 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