[Btrfs-devel] Quick question
    Josef Bacik 
    jbacik at redhat.com
       
    Mon Aug 27 14:37:37 PDT 2007
    
    
  
Hello,
Ok I've just about got this xattr stuff working, the name is getting saved
properly, but the data isn't.  This is what I'm doing to write the data in the
dir item
        btrfs_set_dir_data_len(dir_item, data_len);
        name_ptr = (char *)(dir_item + 1);
        data_ptr = (char *)(name_ptr + name_len + 1);
        btrfs_memcpy(root, path->nodes[0]->b_data, name_ptr, name, name_len);
        btrfs_memcpy(root, path->nodes[0]->b_data, data_ptr, data, data_len);
        btrfs_mark_buffer_dirty(path->nodes[0]);
this keeps resulting in garbage when i try to read it off the disk.  What am I
missing?  Thank you,
Josef
    
    
More information about the Btrfs-devel
mailing list