/alps/fastwriter

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/fastwriter

« back to all changes in this revision

Viewing changes to fastwriter.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-13 19:37:47 UTC
  • Revision ID: csa@dside.dyndns.org-20111213193747-g8ld48dh1kwypice
Properly detect /dev/null as raw device and do not set DIRECT flag on raw devices

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE;
58
58
        break;
59
59
     case FASTWRITER_BUFFER_MAX:
60
 
        ctx->size = get_free_memory();
 
60
        ctx->size = fastwriter_get_free_memory();
61
61
 
62
62
        if ((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE)
63
63
            ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE;
266
266
    if (ctx->pos < ctx->tail) end = ctx->tail;
267
267
    else end = ctx->size;
268
268
 
269
 
 
270
269
    part1 = end - ctx->pos;
271
270
 
272
271
    if (part1 < size) {