@@ -177,44 +177,11 @@ namespace mongo {
177177 return x;
178178 }
179179
180- void NonDurableImpl::setNoJournal (void *dst, void *src, unsigned len) {
181- memcpy (dst, src, len);
182- }
183-
184180 void NonDurableImpl::declareWriteIntent (void *, unsigned ) {
185181 cc ().writeHappened ();
186182 }
187183
188184 void assertLockedForCommitting ();
189- void DurableImpl::setNoJournal (void *dst, void *src, unsigned len) {
190- // we are at least read locked, so we need not worry about REMAPPRIVATEVIEW herein.
191- assertLockedForCommitting ();
192-
193- MemoryMappedFile::makeWritable (dst, len);
194-
195- // we enter the RecoveryJob mutex here, so that if WRITETODATAFILES is happening we do not
196- // conflict with it
197- scoped_lock lk1 ( RecoveryJob::get ()._mx );
198-
199- // we stay in this mutex for everything to work with DurParanoid/validateSingleMapMatches
200- //
201- // either of these mutexes also makes setNoJournal threadsafe, which is good as we call it from a read
202- // (not a write) lock in class SlaveTracking
203- //
204- scoped_lock lk ( privateViews._mutex () );
205-
206- size_t ofs;
207- MongoMMF *f = privateViews.find_inlock (dst, ofs);
208- assert (f);
209- void *w = (((char *)f->view_write ())+ofs);
210- // first write it to the writable (file) view
211- memcpy (w, src, len);
212- if ( memcmp (w, dst, len) ) {
213- // if we get here, a copy-on-write had previously occurred. so write it to the private view too
214- // to keep them in sync. we do this as we do not want to cause a copy on write unnecessarily.
215- memcpy (dst, src, len);
216- }
217- }
218185
219186 static DurableImpl* durableImpl = new DurableImpl();
220187 static NonDurableImpl* nonDurableImpl = new NonDurableImpl();
@@ -403,7 +370,6 @@ namespace mongo {
403370
404371 assert ( mmf->length () == (unsigned ) mmf->length () );
405372
406- scoped_lock lk ( privateViews._mutex () ); // see setNoJournal
407373 if (memcmp (p, w, (unsigned ) mmf->length ()) == 0 )
408374 return ; // next file
409375
0 commit comments