RE: [PATCH] ceph: use the OSD time as the object mtime instead of the client time

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

 



Looks like we do need to keep the client time as the mtime. Since option 1 doesn't really fix the problem, I would vote for option 2.

-----Original Message-----
From: ceph-devel-owner@xxxxxxxxxxxxxxx [mailto:ceph-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Milosz Tanski
Sent: Wednesday, July 30, 2014 2:55 AM
To: Gregory Farnum
Cc: Sage Weil; Wang, Zhiqiang; ceph-devel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] ceph: use the OSD time as the object mtime instead of the client time

Off the top of my head... the fscache code (read only) in the CephFS kclient uses the mtime to see if the item is valid (there was not an object change version counter at the time). I don't know if / how that would be affected of the top of my head.

- M

On Tue, Jul 29, 2014 at 12:02 PM, Gregory Farnum <greg@xxxxxxxxxxx> wrote:
> On Tue, Jul 29, 2014 at 11:46 AM, Sage Weil <sweil@xxxxxxxxxx> wrote:
>> On Tue, 29 Jul 2014, Wang, Zhiqiang wrote:
>>> This fixes a bug when the time of the OSDs and clients are not 
>>> synchronized (especially when client is ahead of OSD), and the cache 
>>> tier dirty ratio reaches the threshold, the agent skips the flush 
>>> work because it thinks the object is too young.
>>>
>>> The skipping flush code is as following:
>>>
>>>   if (obc->obs.oi.mtime + utime_t(pool.info.cache_min_flush_age, 0) > now) {
>>>     dout(20) << __func__ << " skip (too young) " << obc->obs.oi << dendl;
>>>     osd->logger->inc(l_osd_agent_skip);
>>>     return false;
>>>   }
>>
>> Hmm, I think the use of the client mtime is an important property we 
>> want to maintain for the benefit of the rest of the system.  Two 
>> other
>> possibilities:
>
> This was my initial thought as well — but I don't think we're actually 
> relying on that any more (e.g., we used to use the client times for 
> file recovery in the MDS, but the rest of CephFS is now using MDS 
> times anyway). Are there scenarios other than CephFS recovery?
>
>>
>> 1) If cache_min_flush_age is 0, skip the check, so we avoid mtimes in 
>> the future in that case.
>>
>> 2) Add an additional field to object_info_t that is an mtime based on 
>> the OSD's clock, and use that for these checks.
>
> But option 2 is probably still a good idea.
> -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



--
Milosz Tanski
CTO
16 East 34th Street, 15th floor
New York, NY 10016

p: 646-253-9055
e: milosz@xxxxxxxxx
--
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
��.n��������+%������w��{.n����z��u���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[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