Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
5d16b55e68
|
@ -685,8 +685,7 @@ dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
bufoff = offset - db->db_offset;
|
bufoff = offset - db->db_offset;
|
||||||
tocpy = (int)MIN(db->db_size - bufoff, size);
|
tocpy = (int)MIN(db->db_size - bufoff, size);
|
||||||
|
|
||||||
if (!(flags & DMU_READ_ZEROCOPY))
|
bcopy((char *)db->db_data + bufoff, buf, tocpy);
|
||||||
bcopy((char *)db->db_data + bufoff, buf, tocpy);
|
|
||||||
|
|
||||||
offset += tocpy;
|
offset += tocpy;
|
||||||
size -= tocpy;
|
size -= tocpy;
|
||||||
|
@ -699,8 +698,8 @@ dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
const void *buf, dmu_tx_t *tx, int flags)
|
const void *buf, dmu_tx_t *tx)
|
||||||
{
|
{
|
||||||
dmu_buf_t **dbp;
|
dmu_buf_t **dbp;
|
||||||
int numbufs, i;
|
int numbufs, i;
|
||||||
|
@ -728,8 +727,7 @@ dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
else
|
else
|
||||||
dmu_buf_will_dirty(db, tx);
|
dmu_buf_will_dirty(db, tx);
|
||||||
|
|
||||||
if (!(flags & DMU_WRITE_ZEROCOPY))
|
bcopy(buf, (char *)db->db_data + bufoff, tocpy);
|
||||||
bcopy(buf, (char *)db->db_data + bufoff, tocpy);
|
|
||||||
|
|
||||||
if (tocpy == db->db_size)
|
if (tocpy == db->db_size)
|
||||||
dmu_buf_fill_done(db, tx);
|
dmu_buf_fill_done(db, tx);
|
||||||
|
@ -741,13 +739,6 @@ dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
|
||||||
const void *buf, dmu_tx_t *tx)
|
|
||||||
{
|
|
||||||
dmu_write_impl(os, object, offset, size, buf, tx, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_tx_t *tx)
|
dmu_tx_t *tx)
|
||||||
|
@ -1740,7 +1731,6 @@ dmu_fini(void)
|
||||||
EXPORT_SYMBOL(dmu_bonus_hold);
|
EXPORT_SYMBOL(dmu_bonus_hold);
|
||||||
EXPORT_SYMBOL(dmu_free_range);
|
EXPORT_SYMBOL(dmu_free_range);
|
||||||
EXPORT_SYMBOL(dmu_read);
|
EXPORT_SYMBOL(dmu_read);
|
||||||
EXPORT_SYMBOL(dmu_write_impl);
|
|
||||||
EXPORT_SYMBOL(dmu_write);
|
EXPORT_SYMBOL(dmu_write);
|
||||||
|
|
||||||
/* Get information on a DMU object. */
|
/* Get information on a DMU object. */
|
||||||
|
|
|
@ -165,8 +165,8 @@ void zfs_znode_byteswap(void *buf, size_t size);
|
||||||
* The maximum number of bytes that can be accessed as part of one
|
* The maximum number of bytes that can be accessed as part of one
|
||||||
* operation, including metadata.
|
* operation, including metadata.
|
||||||
*/
|
*/
|
||||||
#define DMU_MAX_ACCESS (10<<20) /* 10MB */
|
#define DMU_MAX_ACCESS (10<<20) /* 10MB */
|
||||||
#define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
|
#define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
|
||||||
|
|
||||||
#define DMU_USERUSED_OBJECT (-1ULL)
|
#define DMU_USERUSED_OBJECT (-1ULL)
|
||||||
#define DMU_GROUPUSED_OBJECT (-2ULL)
|
#define DMU_GROUPUSED_OBJECT (-2ULL)
|
||||||
|
@ -506,12 +506,8 @@ int dmu_free_object(objset_t *os, uint64_t object);
|
||||||
*/
|
*/
|
||||||
#define DMU_READ_PREFETCH 0 /* prefetch */
|
#define DMU_READ_PREFETCH 0 /* prefetch */
|
||||||
#define DMU_READ_NO_PREFETCH 1 /* don't prefetch */
|
#define DMU_READ_NO_PREFETCH 1 /* don't prefetch */
|
||||||
#define DMU_READ_ZEROCOPY 2 /* zerocopy on read (test) */
|
|
||||||
#define DMU_WRITE_ZEROCOPY 4 /* zerocopy on write (test) */
|
|
||||||
int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
void *buf, uint32_t flags);
|
void *buf, uint32_t flags);
|
||||||
void dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset,
|
|
||||||
uint64_t size, const void *buf, dmu_tx_t *tx, int flags);
|
|
||||||
void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
const void *buf, dmu_tx_t *tx);
|
const void *buf, dmu_tx_t *tx);
|
||||||
void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
|
|
Loading…
Reference in New Issue