summaryrefslogtreecommitdiffstats
path: root/configure.ac
Commit message (Expand)AuthorAgeFilesLines
* extras: modify run level scripts to support glusterd.v3.1.0qa21Balamurugan Arumugam2010-09-131-4/+4
* remove legacy/protocol from the buildAmar Tumballi2010-09-041-12/+0
* gfid: introduce uuid based handles for inodesAnand Avati2010-09-041-0/+3
* rpc-transport/rdma: By default, enable building of rdma only if libibverbs is...Raghavendra G2010-08-311-1/+4
* Bring in new transport rdma.Raghavendra G2010-08-301-0/+2
* fix build of nfs (cleanup of configure.ac)Anand V. Avati2010-08-101-2/+0
* build: ucontext on Darwin needs _XOPEN_SOURCEShehjar Tikoo2010-08-101-1/+1
* build: Solaris sigwait needs _POSIX_PTHREAD_SEMANTICSShehjar Tikoo2010-08-101-1/+1
* protocol/lib: rename files to standardized names and placesAnand Avati2010-07-141-2/+2
* proper way to do defrag of a mountpointAmar Tumballi2010-07-141-0/+1
* gluster-CLI-and-mgmt-glusterd-added-to-codebaseAmar Tumballi2010-07-081-0/+17
* fix up OS X after dynamic volume changesCsaba Henk2010-07-081-2/+1
* Move rpc to top-levelVijay Bellur2010-06-281-6/+6
* misc updates in mainlineAmar Tumballi2010-06-211-1/+1
* rpc protocolAmar Tumballi2010-06-211-0/+10
* renamed xlator/protocol to xlator/protocol/legacyAmar Tumballi2010-06-211-9/+12
* OS X: make location of launchd service configurableCsaba Henk2010-05-311-0/+6
* OS X: basic additions for OS X client supportCsaba Henk2010-05-211-3/+12
* added features/mac-compatCsaba Henk2010-05-131-0/+2
* structuring of protocol - 2Amar Tumballi2010-05-031-10/+12
* nfs: Add generic nfs translatorShehjar Tikoo2010-03-311-0/+2
* nfs: Add RPC and NFS XDR translation routinesShehjar Tikoo2010-03-311-0/+3
* access-control: Introduce new translatorShehjar Tikoo2010-03-311-0/+2
* new 'features/read-only' module addedAmar Tumballi2010-03-241-0/+2
* updated the build tree.Amar Tumballi2010-03-241-52/+0
* iatt: configure.ac not to build filterAnand V. Avati2010-03-161-4/+0
* Support for Compilation on SolarisVijay Bellur2009-12-201-0/+2
* fix typo in configure.acCsaba Henk2009-12-181-1/+1
* removed every reference to BDB from configure.acAmar Tumballi2009-12-061-69/+0
* glusterfs-volgen honours now build level prefix.Harshavardhana Ranganath2009-12-061-0/+1
* Disable fusermount by default in configure.ac.Pavan Sondur2009-12-031-3/+2
* changed the version of glusterfs from 2.1.0 to 3.0.0Amar Tumballi2009-12-011-1/+1
* Volgen supporting multidisks and booster configuration for nfs and cifsHarshavardhana Ranganath2009-11-261-0/+1
* Add glusterfs-volgen to master, change fusermount options and other changes t...Pavan Sondur2009-11-111-5/+2
* configure.ac: Before checking for libglusterfsclient BUILD_LIBGLUSTERFSCLIENT...vinayak hegde2009-11-031-1/+1
* extras/init.d: make install directory configurable with --with-initdirAnand V. Avati2009-10-271-0/+6
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
* rewriting stat-prefetch translatorRaghavendra G2009-09-081-0/+2
* bring in fusermountCsaba Henk2009-08-121-0/+24
* basic version of direct FUSE interface (ie. not relying on libfuse)Csaba Henk2009-08-121-40/+1
* enable libglusterfsclient build by defaultAnand V. Avati2009-07-231-1/+1
* removed mod_glusterfs from the buildAmar Tumballi2009-07-171-105/+0
* Implementing quick-read translator.Raghavendra G2009-07-161-0/+2
* use fuse_reply_iov() in fuse_readv_cbkBasavanagowda Kanur2009-07-071-0/+9
* fuse 2.8 version check at configure levelHarshavardhana2009-07-011-1/+18
* version changes in GIT repo to differentiate between branchesAmar Tumballi2009-06-301-1/+1
* Booster build should not depend on if mod_glusterfs is disabledHarshavardhana Ranganath2009-06-171-1/+1
* configure.ac: print summary to stdoutAnand V. Avati2009-06-091-2/+0
* Check for returns when apxs fails and disable mod_glusterfsHarshavardhana2009-05-211-4/+10
* add xlator debug/io-statsCsaba Henk2009-05-201-0/+2
outine_fn copy_sectors(BlockDriverState *bs,
- uint64_t start_sect,
- uint64_t cluster_offset,
- int n_start, int n_end)
-{
- BDRVQcowState *s = bs->opaque;
- QEMUIOVector qiov;
- struct iovec iov;
- int n, ret;
-
- /*
- * If this is the last cluster and it is only partially used, we must only
- * copy until the end of the image, or bdrv_check_request will fail for the
- * bdrv_read/write calls below.
- */
- if (start_sect + n_end > bs->total_sectors) {
- n_end = bs->total_sectors - start_sect;
- }
-
- n = n_end - n_start;
- if (n <= 0) {
- return 0;
- }
-
- iov.iov_len = n * BDRV_SECTOR_SIZE;
- iov.iov_base = qemu_blockalign(bs, iov.iov_len);
-
- qemu_iovec_init_external(&qiov, &iov, 1);
-
- BLKDBG_EVENT(bs->file, BLKDBG_COW_READ);
-
- /* Call .bdrv_co_readv() directly instead of using the public block-layer
- * interface. This avoids double I/O throttling and request tracking,
- * which can lead to deadlock when block layer copy-on-read is enabled.
- */
- ret = bs->drv->bdrv_co_readv(bs, start_sect + n_start, n, &qiov);
- if (ret < 0) {
- goto out;
- }
-
- if (s->crypt_method) {
- qcow2_encrypt_sectors(s, start_sect + n_start,
- iov.iov_base, iov.iov_base, n, 1,
- &s->aes_encrypt_key);
- }
-
- BLKDBG_EVENT(bs->file, BLKDBG_COW_WRITE);
- ret = bdrv_co_writev(bs->file, (cluster_offset >> 9) + n_start, n, &qiov);
- if (ret < 0) {
- goto out;
- }
-
- ret = 0;
-out:
- qemu_vfree(iov.iov_base);
- return ret;
-}
-
-
-/*
- * get_cluster_offset
- *
- * For a given offset of the disk image, find the cluster offset in
- * qcow2 file. The offset is stored in *cluster_offset.
- *
- * on entry, *num is the number of contiguous sectors we'd like to
- * access following offset.
- *
- * on exit, *num is the number of contiguous sectors we can read.
- *
- * Returns the cluster type (QCOW2_CLUSTER_*) on success, -errno in error
- * cases.
- */
-int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
- int *num, uint64_t *cluster_offset)
-{
- BDRVQcowState *s = bs->opaque;
- unsigned int l2_index;
- uint64_t l1_index, l2_offset, *l2_table;
- int l1_bits, c;
- unsigned int index_in_cluster, nb_clusters;
- uint64_t nb_available, nb_needed;
- int ret;
-
- index_in_cluster = (offset >> 9) & (s->cluster_sectors - 1);
- nb_needed = *num + index_in_cluster;
-
- l1_bits = s->l2_bits + s->cluster_bits;
-
- /* compute how many bytes there are between the offset and
- * the end of the l1 entry
- */
-
- nb_available = (1ULL << l1_bits) - (offset & ((1ULL << l1_bits) - 1));
-
- /* compute the number of available sectors */
-
- nb_available = (nb_available >> 9) + index_in_cluster;
-
- if (nb_needed > nb_available) {
- nb_needed = nb_available;
- }
-
- *cluster_offset = 0;
-
- /* seek the the l2 offset in the l1 table */
-
- l1_index = offset >> l1_bits;
- if (l1_index >= s->l1_size) {
- ret = QCOW2_CLUSTER_UNALLOCATED;
- goto out;
- }
-
- l2_offset = s->l1_table[l1_index] & L1E_OFFSET_MASK;
- if (!l2_offset) {
- ret = QCOW2_CLUSTER_UNALLOCATED;
- goto out;
- }
-
- /* load the l2 table in memory */
-
- ret = l2_load(bs, l2_offset, &l2_table);
- if (ret < 0) {
- return ret;
- }
-
- /* find the cluster offset for the given disk offset */
-
- l2_index = (offset >> s->cluster_bits) & (s->l2_size - 1);
- *cluster_offset = be64_to_cpu(l2_table[l2_index]);
- nb_clusters = size_to_clusters(s, nb_needed << 9);
-
- ret = qcow2_get_cluster_type(*cluster_offset);
- switch (ret) {
- case QCOW2_CLUSTER_COMPRESSED:
- /* Compressed clusters can only be processed one by one */
- c = 1;
- *cluster_offset &= L2E_COMPRESSED_OFFSET_SIZE_MASK;
- break;
- case QCOW2_CLUSTER_ZERO:
- if (s->qcow_version < 3) {
- return -EIO;
- }
- c = count_contiguous_clusters(nb_clusters, s->cluster_size,
- &l2_table[l2_index], 0,
- QCOW_OFLAG_COMPRESSED | QCOW_OFLAG_ZERO);
- *cluster_offset = 0;
- break;
- case QCOW2_CLUSTER_UNALLOCATED:
- /* how many empty clusters ? */
- c = count_contiguous_free_clusters(nb_clusters, &l2_table[l2_index]);
- *cluster_offset = 0;
- break;
- case QCOW2_CLUSTER_NORMAL:
- /* how many allocated clusters ? */
- c = count_contiguous_clusters(nb_clusters, s->cluster_size,
-