CEPH filesystem development
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: Sage Weil <sage@inktank.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH 01/25] mds: fix end check in Server::handle_client_readdir()
Date: Thu, 24 Jan 2013 10:16:29 +0800	[thread overview]
Message-ID: <5100997D.6010905@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1301230916200.29291@cobra.newdream.net>

On 01/24/2013 01:17 AM, Sage Weil wrote:
> Hi Yan,
> 
> I pushed this one to next, thanks.  BTW what are you using to reproduce 
> this?  We'd like to continue to improve the coverage of 
> ceph-qa-suite.git/suites/fs.
> 

My scripts delete the test directory after finishing a round of fsstress testing.
I noticed that 'rm' emitted "cannot remove directory : Directory not empty" errors
These errors are tentative, if re-try deleting them, it will succeed.

Regards
Yan, Zheng

> Thanks!
> sage
> 
> On Wed, 23 Jan 2013, Yan, Zheng wrote:
> 
>> From: "Yan, Zheng" <zheng.z.yan@intel.com>
>>
>> commit 1174dd3188 (don't retry readdir request after issuing caps)
>> introduced an bug that wrongly marks 'end' in the the readdir reply.
>> The code that touches existing dentries re-uses an iterator, and the
>> iterator is used for checking if readdir is end.
>>
>> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
>> ---
>>  src/mds/Server.cc | 8 +++-----
>>  1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/mds/Server.cc b/src/mds/Server.cc
>> index b70445e..45eed81 100644
>> --- a/src/mds/Server.cc
>> +++ b/src/mds/Server.cc
>> @@ -2895,11 +2895,9 @@ void Server::handle_client_readdir(MDRequest *mdr)
>>  	continue;
>>        } else {
>>  	// touch everything i _do_ have
>> -	for (it = dir->begin(); 
>> -	     it != dir->end(); 
>> -	     it++) 
>> -	  if (!it->second->get_linkage()->is_null())
>> -	    mdcache->lru.lru_touch(it->second);
>> +	for (CDir::map_t::iterator p = dir->begin(); p != dir->end(); p++)
>> +	  if (!p->second->get_linkage()->is_null())
>> +	    mdcache->lru.lru_touch(p->second);
>>  
>>  	// already issued caps and leases, reply immediately.
>>  	if (dnbl.length() > 0) {
>> -- 
>> 1.7.11.7
>>
>>


  reply	other threads:[~2013-01-24  2:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23  3:08 [PATCH 00/24] fixes for MDS cluster recovery Yan, Zheng
2013-01-23  3:08 ` [PATCH 01/25] mds: fix end check in Server::handle_client_readdir() Yan, Zheng
2013-01-23 17:17   ` Sage Weil
2013-01-24  2:16     ` Yan, Zheng [this message]
2013-01-23  3:08 ` [PATCH 02/25] mds: check deleted directory in Server::rdlock_path_xlock_dentry Yan, Zheng
2013-01-23  3:08 ` [PATCH 03/25] mds: lock remote inode's primary dentry during rename Yan, Zheng
2013-01-23  3:08 ` [PATCH 04/25] mds: allow journaling multiple root inodes in EMetaBlob Yan, Zheng
2013-01-23  3:08 ` [PATCH 05/25] mds: introduce XSYN to SYNC lock state transition Yan, Zheng
2013-01-23  3:08 ` [PATCH 06/25] mds: properly set error_dentry for discover reply Yan, Zheng
2013-01-23  3:08 ` [PATCH 07/25] mds: don't early reply rename Yan, Zheng
2013-01-28 21:44   ` Sage Weil
2013-01-29  1:44     ` Yan, Zheng
2013-01-29  2:23       ` Sage Weil
2013-01-29  2:56         ` Yan, Zheng
2013-01-23  3:08 ` [PATCH 08/25] mds: fix "had dentry linked to wrong inode" warning Yan, Zheng
2013-01-23  3:08 ` [PATCH 09/25] mds: splits rename force journal check into separate function Yan, Zheng
2013-01-23  3:08 ` [PATCH 10/25] mds: force journal straydn for rename if necessary Yan, Zheng
2013-01-23  3:08 ` [PATCH 11/25] mds: don't journal non-auth rename source directory Yan, Zheng
2013-01-23  3:08 ` [PATCH 12/25] mds: preserve non-auth/unlinked objects until slave commit Yan, Zheng
2013-01-23  3:08 ` [PATCH 13/25] mds: fix slave rename rollback Yan, Zheng
2013-01-23  3:08 ` [PATCH 14/25] mds: split reslove into two sub-stages Yan, Zheng
2013-01-23  3:08 ` [PATCH 15/25] mds: send resolve messages after all MDS reach resolve stage Yan, Zheng
2013-01-23  3:08 ` [PATCH 16/25] mds: Always use {push,pop}_projected_linkage to change linkage Yan, Zheng
2013-01-23  3:08 ` [PATCH 17/25] mds: don't replace existing slave request Yan, Zheng
2013-01-23  3:08 ` [PATCH 18/25] mds: fix for MDCache::adjust_bounded_subtree_auth Yan, Zheng
2013-01-23  3:08 ` [PATCH 19/25] mds: fix for MDCache::disambiguate_imports Yan, Zheng
2013-01-23  3:08 ` [PATCH 20/25] mds: journal inode's projected parent when doing link rollback Yan, Zheng
2013-01-23  3:08 ` [PATCH 21/25] mds: don't journal opened non-auth inode Yan, Zheng
2013-01-23  3:08 ` [PATCH 22/25] mds: properly clear CDir::STATE_COMPLETE when replaying EImportStart Yan, Zheng
2013-01-23  3:08 ` [PATCH 23/25] mds: move variables special to rename into MDRequest::more Yan, Zheng
2013-01-23  3:09 ` [PATCH 24/25] mds: rejoin remote wrlocks and frozen auth pin Yan, Zheng
2013-01-23  3:09 ` [PATCH 25/25] mds: fetch missing inodes from disk Yan, Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5100997D.6010905@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox