lkml.org 
[lkml]   [2009]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [GIT PULL] ocfs2 changes for 2.6.32
    Date

    > int copy_file(const char *src, const char *dst)
    > {
    > /* Start a file copy */
    > int cookie = copyfile(src, dst, 0);
    >
    > /* Async case? */
    > if (cookie > 0) {
    > int ret;
    >
    > while ((ret = copyfile_ctrl(cookie, COPYFILE_WAIT)) > 0)
    > /* nothing */;
    >
    > /* Error handling is shared for async/sync */
    > cookie = ret;
    > }
    > if (cookie < 0) {
    > perror("copyfile failed");
    > return -1;
    > }

    I guess one bit of semantics to figure out is what happens if copyfile()
    does the async case but then copyfile_ctrl() returns an error halfway
    through... is the state of the dest file just undefined?

    - R.


    \
     
     \ /
      Last update: 2009-09-17 20:43    [W:0.026 / U:182.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site