| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: Request for information on bloated writes using Swift |
| From: | Dilip Simha <nmdilipsimha@xxxxxxxxx> |
| Date: | Wed, 3 Feb 2016 14:43:27 -0800 |
| Cc: | Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VzbBch1XzPDhyUtBkaUJTxaBIVHpnSkyR+aINA3LprY=; b=FkW0G1z79/UpNnweXr5t0VimGIuO34Sb04a9diZcZaLAm90K3OgNJqI3f4p3ravn7v Wcde7kVeU+aS4+ptgdZBsV95hOpWYRG36QSegzjY7EaA5/QJbjwXxXQzIyAkVQqnmKXC g61YbtuRlP7vBaPbgDdnPdhsEA/TASJgBUmpbZ5PikbP8lqrfpEVaykHkW4WkYx7rlQ7 Y37ulAMc9D8Qh5DFSjDp3S3TTASlcVv0PfvCLtC+xyGwkMqNu5qou826WQdIShPPBw26 yXPJS9GkY/ur5jzT6Hvg8+1h9B5L0ibMHGClR54KHA8xlZ47mFXn07COtswIhjHIcZSQ 5Uhg== |
| In-reply-to: | <20160203215144.GE459@dastard> |
| References: | <CAFHL4X1JU02LFYntkqhYg1N++ZU46ML3v5higo1nRsPyoZxL5A@xxxxxxxxxxxxxx> <56B16A3C.1030207@xxxxxxxxxxx> <CAFHL4X0QBtFpz3=HMVMrp6NoaW5BRkDSoTE1yJQvQ=0JrW5+YQ@xxxxxxxxxxxxxx> <20160203063705.GB459@dastard> <CAFHL4X0m8Ov+zJxteUJJxzEHVXpJsfe=9mtapRmWkhT6VRkDxg@xxxxxxxxxxxxxx> <20160203083016.GD459@dastard> <56B21690.2070304@xxxxxxxxxxx> <20160203215144.GE459@dastard> |
|
On Wed, Feb 3, 2016 at 1:51 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
I am sorry, but I don't agree to this. How can an user application know about step2. XFS may preallocate 256k or any other size depending on the free space available on the system. Some other file-system may not even do speculative preallocation. So it makes little sense for an user-application to own up responsibility for disk space that it doesn't know about. Â
I agree, having to remove the XFS_DIFLAG_PREALLOC flag is not a simpler option but needs careful thought. However, as Dave suggested, its easier to NOT do speculative preallocation on inodes that have this flag already set. This is simply because of the fact that XFS assumes the user-application issued fallocate with the best knowledge of its workload. By the way, this need not be just the Swift. Any user application can experience this issue. Also, I am not associated with Swift!
I don't understand why would this be the case. If XFS doesn't do speculative preallocation then for the 256 byte write after the end of EOF will simply result in pushing the EOF ahead. So I see no harm if XFS doesn't do speculative preallocation when XFS_DIFLAG_PREALLOC is set. Â
Its not a bug. Assume a use-case like appending to a file. Would you say append is a buggy operation? An append operation can come at any time after the initial fallocate and write has happened. Simple steps to recreate this bloated-write issue is: xfs_io -f -c "falloc 0 256k" -c "pwrite 0 256k" -c "pwrite 256k 256" t1.txt Thanks & Regards, Dilip
|
| Previous by Date: | Re: stop using ioends for direct write completions, Dave Chinner |
|---|---|
| Next by Date: | Re: real-time device warning, Ross Zwisler |
| Previous by Thread: | Re: Request for information on bloated writes using Swift, Dave Chinner |
| Next by Thread: | Re: Request for information on bloated writes using Swift, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |