Home | History | Annotate | Download | only in lfs

Lines Matching defs:attribute

44  * binary blob of zero or more bytes.  The ULFS1 extended attribute service
111 * Per-FS attribute lock protecting attribute operations.
147 * attribute.
151 * zero-length attrname (used to retrieve application attribute list)
165 * Autocreate an attribute storage
208 * Release extended attribute mount lock, otherwise
276 * Now enable attribute.
291 printf("%s: attribute %s created but not found!\n",
306 * Locate an attribute given a name and mountpoint.
369 * Start extended attribute support on an FS.
474 * Enable an EA using the passed filesystem, backing vnode, attribute name,
511 * attribute files. Then invoke ulfs_extattr_enable_with_open() on each
512 * to attempt to start the attribute. Leaves the directory locked on
710 * Stop extended attribute support on an FS.
744 * Enable a named attribute on the specified filesystem; provide an
745 * unlocked backing vnode to hold the attribute data.
751 struct ulfs_extattr_list_entry *attribute;
761 attribute = kmem_zalloc(sizeof(*attribute), KM_SLEEP);
773 strncpy(attribute->uele_attrname, attrname,
775 attribute->uele_attrnamespace = attrnamespace;
776 memset(&attribute->uele_fileheader, 0,
779 attribute->uele_backing_vnode = backing_vnode;
783 aiov.iov_base = (void *) &attribute->uele_fileheader;
798 printf("ulfs_extattr_enable: malformed attribute header\n");
804 * Try to determine the byte order of the attribute file.
806 if (attribute->uele_fileheader.uef_magic != ULFS_EXTATTR_MAGIC) {
807 attribute->uele_flags |= UELE_F_NEEDSWAP;
808 attribute->uele_fileheader.uef_magic =
809 ulfs_rw32(attribute->uele_fileheader.uef_magic,
810 UELE_NEEDSWAP(attribute));
811 if (attribute->uele_fileheader.uef_magic != ULFS_EXTATTR_MAGIC) {
812 printf("ulfs_extattr_enable: invalid attribute header "
818 attribute->uele_fileheader.uef_version =
819 ulfs_rw32(attribute->uele_fileheader.uef_version,
820 UELE_NEEDSWAP(attribute));
821 attribute->uele_fileheader.uef_size =
822 ulfs_rw32(attribute->uele_fileheader.uef_size,
823 UELE_NEEDSWAP(attribute));
825 if (attribute->uele_fileheader.uef_version != ULFS_EXTATTR_VERSION) {
826 printf("ulfs_extattr_enable: incorrect attribute header "
832 LIST_INSERT_HEAD(&ump->um_extattr.uepm_list, attribute,
842 kmem_free(attribute, sizeof(*attribute));
847 * Disable extended attribute support on an FS.
957 * Read extended attribute header for a given vnode and attribute.
1000 * Attribute headers are kept in file system byte order.
1037 * Vnode operation to retrieve a named extended attribute.
1070 * Real work associated with retrieving a named attribute--assumes that
1071 * the attribute lock has already been grabbed.
1077 struct ulfs_extattr_list_entry *attribute;
1092 attribute = ulfs_extattr_find_attr(ump, attrnamespace, name);
1093 if (!attribute)
1098 * extended attribute semantic. Otherwise we can't guarantee
1108 if (attribute->uele_backing_vnode != vp)
1109 vn_lock(attribute->uele_backing_vnode, LK_SHARED | LK_RETRY);
1111 error = ulfs_extattr_get_header(vp, attribute, &ueh, &base_offset);
1121 /* Allow for offset into the attribute data. */
1133 error = VOP_READ(attribute->uele_backing_vnode, uio,
1146 if (attribute->uele_backing_vnode != vp)
1147 VOP_UNLOCK(attribute->uele_backing_vnode);
1153 * Vnode operation to list extended attribute for a vnode
1188 * the attribute lock has already been grabbed.
1282 * Vnode operation to remove a named attribute.
1313 * Vnode operation to set a named attribute.
1354 * assumes that the attribute lock has already been grabbed.
1360 struct ulfs_extattr_list_entry *attribute;
1380 attribute = ulfs_extattr_find_attr(ump, attrnamespace, name);
1381 if (!attribute) {
1383 name, l, &attribute);
1387 attribute =
1391 if (error || !attribute)
1398 * Any size greater than attribute size limit
1401 uio->uio_resid > attribute->uele_fileheader.uef_size)
1410 attribute->uele_fileheader.uef_size);
1416 UELE_NEEDSWAP(attribute));
1418 UELE_NEEDSWAP(attribute));
1419 ueh.ueh_i_gen = ulfs_rw32(ip->i_gen, UELE_NEEDSWAP(attribute));
1433 if (attribute->uele_backing_vnode != vp)
1434 vn_lock(attribute->uele_backing_vnode,
1440 error = VOP_WRITE(attribute->uele_backing_vnode, &local_aio, ioflag,
1459 error = VOP_WRITE(attribute->uele_backing_vnode, uio, ioflag,
1465 if (attribute->uele_backing_vnode != vp)
1466 VOP_UNLOCK(attribute->uele_backing_vnode);
1472 * Real work associated with removing an extended attribute from a vnode.
1473 * Assumes the attribute lock has already been grabbed.
1479 struct ulfs_extattr_list_entry *attribute;
1498 attribute = ulfs_extattr_find_attr(ump, attrnamespace, name);
1499 if (!attribute)
1506 if (attribute->uele_backing_vnode != vp)
1507 vn_lock(attribute->uele_backing_vnode, LK_EXCLUSIVE | LK_RETRY);
1509 error = ulfs_extattr_get_header(vp, attribute, &ueh, &base_offset);
1529 error = VOP_WRITE(attribute->uele_backing_vnode, &local_aio, ioflag,
1538 VOP_UNLOCK(attribute->uele_backing_vnode);