Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ree_fs_truncate() sync #2099

Merged
merged 4 commits into from
Feb 2, 2018
Merged

ree_fs_truncate() sync #2099

merged 4 commits into from
Feb 2, 2018

Commits on Feb 2, 2018

  1. core: REE FS: ree_fs_truncate(): fix reversed error checks

    Reported-by: Kevin Peng <kevinp@marvell.com>
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    jforissier committed Feb 2, 2018
    Configuration menu
    Copy the full SHA
    f480b6a View commit details
    Browse the repository at this point in the history
  2. core: REE FS: make sure dirty flag is set when object is truncated

    When an object is truncated but the number of blocks is unchanged, only
    the metadata's length field is modified. The hash tree layer has to be
    notified so that it knows it has to flush the data before closing the
    object, otherwise the truncation is lost.
    Add a function for that purpose: tee_fs_htree_meta_set_dirty(), and
    call it whenever meta->length is updated.
    
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    jforissier committed Feb 2, 2018
    Configuration menu
    Copy the full SHA
    3c750db View commit details
    Browse the repository at this point in the history
  3. core: REE FS: ree_fs_truncate() commit dirh writes

    To commit the changes done by ree_fs_truncate() in the dirfile, call
    commit_dirh_writes() before closing the dirh.
    
    Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
    jenswi-linaro authored and jforissier committed Feb 2, 2018
    Configuration menu
    Copy the full SHA
    bc0e3b6 View commit details
    Browse the repository at this point in the history
  4. core: fs_htree: include meta in root hash

    Includes the meta data when calculating the hash of the root node to
    detect changes in file length while number of blocks is unchanged.
    
    Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
    Fixes: OP-TEE#2094
    Reported-by: Kevin Peng <kevinp@marvell.com>
    Tested-by: Kevin Peng <kevinp@marvell.com>
    [jf: add Fixes:, Reported-by: and Tested-by: tags]
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    jenswi-linaro authored and jforissier committed Feb 2, 2018
    Configuration menu
    Copy the full SHA
    d4fd366 View commit details
    Browse the repository at this point in the history