Re: [PATCH] bundle, fast-import: detect write failure

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: git list <git@...>
Date: Thursday, January 10, 2008 - 8:26 am

Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Yes.  I mentioned that in the commit log:

    * bundle.c (create_bundle): Die upon write failure.
    * fast-import.c (keep_pack): Die upon write or close failure.

But even the summary is accurate if you interpret
"write" not as the syscall, but as the semantic
push-data-through-OS-to-disk operation.


No.  Whether open succeeded is a separate matter.
Avoiding an unreported write (or close-writable-fd) failure is not
being "overzealously defensive."

From "man 2 close",

    -------------
    NOTES
       Not  checking  the return value of close() is a common but nevertheless
       serious programming error.  It is quite possible that errors on a  pre-
       vious  write(2) operation are first reported at the final close().  Not
       checking the return value when closing the file may lead to silent loss
       of data.  This can especially be observed with NFS and with disk quota.
    -------------
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 4:54 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Thu Jan 10, 8:05 am)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 8:26 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Thu Jan 10, 8:37 am)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 9:00 am)
Re: [PATCH] bundle, fast-import: detect write failure, Junio C Hamano, (Fri Jan 11, 3:36 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Fri Jan 11, 7:39 am)
Re: [PATCH] bundle, fast-import: detect write failure, David Tweed, (Fri Jan 11, 5:37 am)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 12:25 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 2:05 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 2:18 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 5:17 am)