Thread (10 messages) 10 messages, 3 authors, 2017-07-13

Re: [PATCH] xfsdump: fix race condition between lseek() and read()/write()

From: Eric Sandeen <hidden>
Date: 2017-07-12 19:33:39

On 07/12/2017 01:46 PM, Eric Sandeen wrote:
Sorry, I was wrong ...

quoted
diff --git a/inventory/inv_idx.c b/inventory/inv_idx.c
index 95529e8..cd9b9cb 100644
--- a/inventory/inv_idx.c
+++ b/inventory/inv_idx.c
@@ -341,8 +341,8 @@ idx_put_sesstime( inv_sestoken_t tok, bool_t whichtime)
        rval = GET_REC_NOLOCK( fd, &ent, sizeof( invt_entry_t ),
                                tok->sd_invtok->d_invindex_off);

This sets the offset to d_invindex_off
... and reads sizeof(invt_entry_t), advancing by that much.
quoted
 			      ent.ie_timeperiod.tp_start,
 			      ent.ie_timeperiod.tp_end );
 #endif
-	rval = PUT_REC_NOLOCK_SEEKCUR( fd, &ent, sizeof( invt_entry_t ),
-				      -(off64_t)(sizeof( invt_entry_t )));
This backed up one entry from the current offset...
which goes back to...
quoted
+	rval = PUT_REC_NOLOCK(fd, &ent, sizeof(invt_entry_t),
+			      tok->sd_invtok->d_invindex_off);
...d_invindex_off.  Sorry for the false alarm.

-eric
but this keeps it at the current offset, no?  Isn't this a different behavior?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help