lkml.org 
[lkml]   [2004]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 16/20] Re: [2.6-BK-URL] NTFS 2.1.17 release
    This is patch 16/20 in the series.  It contains the following ChangeSet:

    <aia21@cantab.net> (04/08/17 1.1822)
    NTFS: Fix fs/ntfs/lcnalloc.c::ntfs_cluster_alloc() to use LCN_RL_NOT_MAPPED
    rather than LCN_ENOENT as runlist terminator. Also, make it not create a
    LCN_RL_NOT_MAPPED element at the beginning.

    Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

    Best regards,

    Anton
    --
    Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
    Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
    Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
    WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

    ===================================================================

    diff -Nru a/fs/ntfs/lcnalloc.c b/fs/ntfs/lcnalloc.c
    --- a/fs/ntfs/lcnalloc.c 2004-08-18 20:50:37 +01:00
    +++ b/fs/ntfs/lcnalloc.c 2004-08-18 20:50:37 +01:00
    @@ -167,16 +167,9 @@
    rl = ntfs_malloc_nofs(PAGE_SIZE);
    if (!rl)
    return ERR_PTR(-ENOMEM);
    - rlpos = 0;
    - if (start_vcn) {
    - rl[0].vcn = 0;
    - rl[0].lcn = LCN_RL_NOT_MAPPED;
    - rl[0].length = start_vcn;
    - rlpos++;
    - }
    - rl[rlpos].vcn = start_vcn;
    - rl[rlpos].lcn = LCN_ENOENT;
    - rl[rlpos].length = 0;
    + rl[0].vcn = start_vcn;
    + rl[0].lcn = LCN_RL_NOT_MAPPED;
    + rl[0].length = 0;
    return rl;
    }
    /* Take the lcnbmp lock for writing. */
    @@ -405,14 +398,7 @@
    } else {
    ntfs_debug("Adding new run, is first "
    "run.");
    - rl[rlpos].vcn = 0;
    - if (start_vcn) {
    - rl[rlpos].lcn =
    - LCN_RL_NOT_MAPPED;
    - rl[rlpos].length = start_vcn;
    - rlpos++;
    - rl[rlpos].vcn = start_vcn;
    - }
    + rl[rlpos].vcn = start_vcn;
    }
    rl[rlpos].lcn = prev_lcn = lcn + bmp_pos;
    rl[rlpos].length = prev_run_len = 1;
    @@ -746,7 +732,7 @@
    /* Add runlist terminator element. */
    if (likely(rl)) {
    rl[rlpos].vcn = rl[rlpos - 1].vcn + rl[rlpos - 1].length;
    - rl[rlpos].lcn = LCN_ENOENT;
    + rl[rlpos].lcn = LCN_RL_NOT_MAPPED;
    rl[rlpos].length = 0;
    }
    if (likely(page && !IS_ERR(page))) {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:0.024 / U:30.056 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site