Print this page
OS-5148 ftruncate at offset should emit proper events
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Fix vnode.h mismerge
OS-3294 add support for inotify
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/vnode.h
          +++ new/usr/src/uts/common/sys/vnode.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright (c) 2013, Joyent, Inc. All rights reserved.
       24 + * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  25   25   */
  26   26  
  27   27  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  28   28  /*        All Rights Reserved   */
  29   29  
  30   30  /*
  31   31   * University Copyright- Copyright (c) 1982, 1986, 1988
  32   32   * The Regents of the University of California
  33   33   * All Rights Reserved
  34   34   *
↓ open down ↓ 701 lines elided ↑ open up ↑
 736  736          VE_RENAME_DEST  = 2,    /* Rename, with vnode as target/destination */
 737  737          VE_REMOVE       = 3,    /* Remove of vnode's name */
 738  738          VE_RMDIR        = 4,    /* Remove of directory vnode's name */
 739  739          VE_CREATE       = 5,    /* Create with vnode's name which exists */
 740  740          VE_LINK         = 6,    /* Link with vnode's name as source */
 741  741          VE_RENAME_DEST_DIR      = 7,    /* Rename with vnode as target dir */
 742  742          VE_MOUNTEDOVER  = 8,    /* File or Filesystem got mounted over vnode */
 743  743          VE_TRUNCATE = 9,        /* Truncate */
 744  744          VE_PRE_RENAME_SRC = 10, /* Pre-rename, with vnode as source */
 745  745          VE_PRE_RENAME_DEST = 11, /* Pre-rename, with vnode as target/dest. */
 746      -        VE_PRE_RENAME_DEST_DIR = 12 /* Pre-rename with vnode as target dir */
      746 +        VE_PRE_RENAME_DEST_DIR = 12, /* Pre-rename with vnode as target dir */
      747 +        VE_RENAME_SRC_DIR = 13, /* Rename with vnode as source dir */
      748 +        VE_RESIZE       = 14    /* Resize/truncate to non-zero offset */
 747  749  } vnevent_t;
 748  750  
 749  751  /*
 750  752   * Values for checking vnode open and map counts
 751  753   */
 752  754  enum v_mode { V_READ, V_WRITE, V_RDORWR, V_RDANDWR };
 753  755  
 754  756  typedef enum v_mode v_mode_t;
 755  757  
 756  758  #define V_TRUE  1
↓ open down ↓ 534 lines elided ↑ open up ↑
1291 1293      const char *path, size_t plen);
1292 1294  void vn_renamepath(vnode_t *dvp, vnode_t *vp, const char *nm, size_t len);
1293 1295  
1294 1296  /* Vnode event notification */
1295 1297  void    vnevent_rename_src(vnode_t *, vnode_t *, char *, caller_context_t *);
1296 1298  void    vnevent_rename_dest(vnode_t *, vnode_t *, char *, caller_context_t *);
1297 1299  void    vnevent_remove(vnode_t *, vnode_t *, char *, caller_context_t *);
1298 1300  void    vnevent_rmdir(vnode_t *, vnode_t *, char *, caller_context_t *);
1299 1301  void    vnevent_create(vnode_t *, caller_context_t *);
1300 1302  void    vnevent_link(vnode_t *, caller_context_t *);
1301      -void    vnevent_rename_dest_dir(vnode_t *, caller_context_t *ct);
     1303 +void    vnevent_rename_dest_dir(vnode_t *, vnode_t *, char *,
     1304 +    caller_context_t *ct);
1302 1305  void    vnevent_mountedover(vnode_t *, caller_context_t *);
1303 1306  void    vnevent_truncate(vnode_t *, caller_context_t *);
1304 1307  int     vnevent_support(vnode_t *, caller_context_t *);
1305 1308  void    vnevent_pre_rename_src(vnode_t *, vnode_t *, char *,
1306 1309              caller_context_t *);
1307 1310  void    vnevent_pre_rename_dest(vnode_t *, vnode_t *, char *,
1308 1311              caller_context_t *);
1309 1312  void    vnevent_pre_rename_dest_dir(vnode_t *, vnode_t *, char *,
1310 1313              caller_context_t *);
     1314 +void    vnevent_resize(vnode_t *, caller_context_t *);
1311 1315  
1312 1316  /* Vnode specific data */
1313 1317  void vsd_create(uint_t *, void (*)(void *));
1314 1318  void vsd_destroy(uint_t *);
1315 1319  void *vsd_get(vnode_t *, uint_t);
1316 1320  int vsd_set(vnode_t *, uint_t, void *);
1317 1321  void vsd_free(vnode_t *);
1318 1322  
1319 1323  /*
1320 1324   * Extensible vnode attribute (xva) routines:
↓ open down ↓ 128 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX