Skip to content
Snippets Groups Projects
Select Git revision
  • 5b21f2ed3f2947b5195b65c9fdbdd9e52904cc03
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

ordered-data.c

Blame
    • Zheng Yan's avatar
      5b21f2ed
      Btrfs: extent_map and data=ordered fixes for space balancing · 5b21f2ed
      Zheng Yan authored
      
      * Add an EXTENT_BOUNDARY state bit to keep the writepage code
      from merging data extents that are in the process of being
      relocated.  This allows us to do accounting for them properly.
      
      * The balancing code relocates data extents indepdent of the underlying
      inode.  The extent_map code was modified to properly account for
      things moving around (invalidating extent_map caches in the inode).
      
      * Don't take the drop_mutex in the create_subvol ioctl.  It isn't
      required.
      
      * Fix walking of the ordered extent list to avoid races with sys_unlink
      
      * Change the lock ordering rules.  Transaction start goes outside
      the drop_mutex.  This allows btrfs_commit_transaction to directly
      drop the relocation trees.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      5b21f2ed
      History
      Btrfs: extent_map and data=ordered fixes for space balancing
      Zheng Yan authored
      
      * Add an EXTENT_BOUNDARY state bit to keep the writepage code
      from merging data extents that are in the process of being
      relocated.  This allows us to do accounting for them properly.
      
      * The balancing code relocates data extents indepdent of the underlying
      inode.  The extent_map code was modified to properly account for
      things moving around (invalidating extent_map caches in the inode).
      
      * Don't take the drop_mutex in the create_subvol ioctl.  It isn't
      required.
      
      * Fix walking of the ordered extent list to avoid races with sys_unlink
      
      * Change the lock ordering rules.  Transaction start goes outside
      the drop_mutex.  This allows btrfs_commit_transaction to directly
      drop the relocation trees.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    drm_lock.c 10.91 KiB
    /**
     * \file drm_lock.c
     * IOCTLs for locking
     *
     * \author Rickard E. (Rik) Faith <faith@valinux.com>
     * \author Gareth Hughes <gareth@valinux.com>
     */
    
    /*
     * Created: Tue Feb  2 08:37:54 1999 by faith@valinux.com
     *
     * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
     * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
     * All Rights Reserved.
     *
     * Permission is hereby granted, free of charge, to any person obtaining a
     * copy of this software and associated documentation files (the "Software"),
     * to deal in the Software without restriction, including without limitation
     * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     * and/or sell copies of the Software, and to permit persons to whom the
     * Software is furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice (including the next
     * paragraph) shall be included in all copies or substantial portions of the
     * Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
     * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     * OTHER DEALINGS IN THE SOFTWARE.
     */
    
    #include "drmP.h"
    
    static int drm_notifier(void *priv);
    
    /**
     * Lock ioctl.
     *
     * \param inode device inode.
     * \param file_priv DRM file private.
     * \param cmd command.
     * \param arg user argument, pointing to a drm_lock structure.
     * \return zero on success or negative number on failure.
     *
     * Add the current task to the lock wait queue, and attempt to take to lock.
     */
    int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
    {
    	DECLARE_WAITQUEUE(entry, current);
    	struct drm_lock *lock = data;
    	struct drm_master *master = file_priv->master;
    	int ret = 0;
    
    	++file_priv->lock_count;
    
    	if (lock->context == DRM_KERNEL_CONTEXT) {
    		DRM_ERROR("Process %d using kernel context %d\n",
    			  task_pid_nr(current), lock->context);
    		return -EINVAL;
    	}
    
    	DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
    		  lock->context, task_pid_nr(current),
    		  master->lock.hw_lock->lock, lock->flags);
    
    	if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE))