| To: | Boaz Harrosh <boaz@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: xfs: untangle the direct I/O and DAX path, fix DAX locking |
| From: | Christoph Hellwig <hch@xxxxxx> |
| Date: | Tue, 28 Jun 2016 17:39:25 +0200 |
| Cc: | Christoph Hellwig <hch@xxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-nvdimm@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <5772820E.2080403@xxxxxxxxxxxxx> |
| References: | <1466609236-23801-1-git-send-email-hch@xxxxxx> <20160623232446.GA12670@dastard> <20160624072612.GA22205@xxxxxx> <20160624230045.GG12670@dastard> <20160628131059.GA30475@xxxxxx> <57727B27.7060104@xxxxxxxxxxxxx> <20160628133928.GB31283@xxxxxx> <5772820E.2080403@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.17 (2007-11-01) |
On Tue, Jun 28, 2016 at 04:56:30PM +0300, Boaz Harrosh wrote: > Actually with O_APPEND each write request should write a different region > of the file, there are no overlapping writes. And no issue of which version > of the > write came last and got its data written. You have one fd for multiple threads or processes (it doesn't matter if you're using O_APPEND or not), and all of them write to it. i_size is only updated once the write finishes, so having multiple concurrent writes will mean multiple records go into the same regions. Now to be fair in current XFS writes beyond i_size will always take the lock exclusively, so for this case we will not get concurrent writes and thus data corruption anyway. But if you have a cycling log that gets overwritten (say a database journal) we're back to square one. > I still don't see how an application can use the fact that two writers > will not give them mixed records. And surly it does not work on a shared > FS. So I was really wondering if you know of any such app If it doesn't work for two threads using the same fd on a shared fs the fs is broken. |
| Previous by Date: | Re: xfs: untangle the direct I/O and DAX path, fix DAX locking, Boaz Harrosh |
|---|---|
| Next by Date: | Re: [PATCH] xfs_repair: don't call xfs_sb_quota_from_disk twice, Eric Sandeen |
| Previous by Thread: | Re: xfs: untangle the direct I/O and DAX path, fix DAX locking, Boaz Harrosh |
| Next by Thread: | Re: xfs: untangle the direct I/O and DAX path, fix DAX locking, Boaz Harrosh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |