#ifndef CRYPTO_H #define CRYPTO_H #include "taia.h" #include "crypto_verify_32.h" #include "crypto_hash_sha512.h" #include "crypto_box_curve25519xsalsa20poly1305.h" #include "crypto_scalarmult_curve25519.h" #include "crypto_auth_hmacsha512256.h" #define crypto_box_zerobytes crypto_box_curve25519xsalsa20poly1305_ZEROBYTES #define crypto_box_boxzerobytes crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES #define crypto_box_noncebytes crypto_box_curve25519xsalsa20poly1305_NONCEBYTES #define crypto_box_beforenmbytes crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES #define crypto_box_beforenm crypto_box_curve25519xsalsa20poly1305_beforenm #define crypto_box_afternm crypto_box_curve25519xsalsa20poly1305_afternm #define crypto_box_open_afternm crypto_box_curve25519xsalsa20poly1305_open_afternm #define crypto_box_pub_key_size crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES #define crypto_box_sec_key_size crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES #define NONCE_LENGTH (sizeof(struct taia)) #define NONCE_RND_LENGTH (crypto_box_boxzerobytes - NONCE_LENGTH) #define NONCE_ALL_LENGTH (crypto_box_boxzerobytes + NONCE_LENGTH) #define NONCE_OFFSET (crypto_box_noncebytes - NONCE_LENGTH) #define NONCE_EDN_OFFSET(x) ((x) + NONCE_OFFSET) #define NONCE_PKT_OFFSET(x) ((x) + NONCE_RND_LENGTH) #endif /* CRYPTO_H */ ket-rx-pump-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/Documentation/i2c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2016-09-30 10:40:52 -0500
committerDavid Sterba <dsterba@suse.com>2016-10-24 18:20:21 +0200
commit0b34c261e235a5c74dcf78bd305845bd15fe2b42 (patch)
tree07905fb6c4265397f59fd380a1abe6120d685d24 /Documentation/i2c
parent4547f4d8ffd63ba4ac129f9136027bd14b729101 (diff)
btrfs: qgroup: Prevent qgroup->reserved from going subzero
While free'ing qgroup->reserved resources, we much check if the page has not been invalidated by a truncate operation by checking if the page is still dirty before reducing the qgroup resources. Resources in such a case are free'd when the entire extent is released by delayed_ref. This fixes a double accounting while releasing resources in case of truncating a file, reproduced by the following testcase. SCRATCH_DEV=/dev/vdb SCRATCH_MNT=/mnt mkfs.btrfs -f $SCRATCH_DEV mount -t btrfs $SCRATCH_DEV $SCRATCH_MNT cd $SCRATCH_MNT btrfs quota enable $SCRATCH_MNT btrfs subvolume create a btrfs qgroup limit 500m a $SCRATCH_MNT sync for c in {1..15}; do dd if=/dev/zero bs=1M count=40 of=$SCRATCH_MNT/a/file; done sleep 10 sync sleep 5 touch $SCRATCH_MNT/a/newfile echo "Removing file" rm $SCRATCH_MNT/a/file Fixes: b9d0b38928 ("btrfs: Add handler for invalidate page") Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Documentation/i2c')