static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
#define yaffs_inode_to_obj_lv(iptr) ((iptr)->i_private)
static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
#define yaffs_inode_to_obj_lv(iptr) ((iptr)->i_private)
void yaffs_put_link(struct dentry *dentry, struct nameidata *nd, void *alias);
static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd);
void yaffs_put_link(struct dentry *dentry, struct nameidata *nd, void *alias);
static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd);
* next object before the object is deleted.
*
* Many readdirs (and thus seach conexts) may be alive simulateously so
* next object before the object is deleted.
*
* Many readdirs (and thus seach conexts) may be alive simulateously so
else
sc->next_return = ylist_entry(
dir->variant.dir_variant.children.next,
else
sc->next_return = ylist_entry(
dir->variant.dir_variant.children.next,
}
struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
}
struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
obj = yaffs_get_equivalent_obj(obj); /* in case it was a hardlink */
/* Can't hold gross lock when calling yaffs_get_inode() */
obj = yaffs_get_equivalent_obj(obj); /* in case it was a hardlink */
/* Can't hold gross lock when calling yaffs_get_inode() */
}
struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
}
struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
loff_t *pos)
{
static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
loff_t *pos)
{
struct yaffs_search_context *sc;
struct inode *inode = f->f_dentry->d_inode;
unsigned long offset, curoffs;
struct yaffs_search_context *sc;
struct inode *inode = f->f_dentry->d_inode;
unsigned long offset, curoffs;
uid_t uid = YCRED(current)->fsuid;
gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : YCRED(current)->fsgid;
uid_t uid = YCRED(current)->fsuid;
gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : YCRED(current)->fsgid;
static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
T(YAFFS_TRACE_OS, (TSTR("yaffs_rename\n")));
dev = yaffs_inode_to_obj(old_dir)->my_dev;
T(YAFFS_TRACE_OS, (TSTR("yaffs_rename\n")));
dev = yaffs_inode_to_obj(old_dir)->my_dev;
struct super_block *sb = dentry->d_sb;
T(YAFFS_TRACE_OS, (TSTR("yaffs_statfs\n")));
struct super_block *sb = dentry->d_sb;
T(YAFFS_TRACE_OS, (TSTR("yaffs_statfs\n")));
list_for_each_entry(iptr,&sb->s_inodes, i_sb_list){
obj = yaffs_inode_to_obj(iptr);
list_for_each_entry(iptr,&sb->s_inodes, i_sb_list){
obj = yaffs_inode_to_obj(iptr);
unsigned scattered = 0; /* Free chunks not in an erased block */
if(erased_chunks < dev->n_free_chunks)
unsigned scattered = 0; /* Free chunks not in an erased block */
if(erased_chunks < dev->n_free_chunks)
unsigned int oneshot_checkpoint = (yaffs_auto_checkpoint & 4);
unsigned gc_urgent = yaffs_bg_gc_urgency(dev);
int do_checkpoint;
unsigned int oneshot_checkpoint = (yaffs_auto_checkpoint & 4);
unsigned gc_urgent = yaffs_bg_gc_urgency(dev);
int do_checkpoint;
- yaffs_dev_t *dev = (yaffs_dev_t *)data;
- struct yaffs_linux_context *context = yaffs_dev_to_lc(dev);
+ struct yaffs_dev *dev = (struct yaffs_dev *)data;
+ struct yaffs_linux_context *context = struct yaffs_devo_lc(dev);
unsigned long now = jiffies;
unsigned long next_dir_update = now;
unsigned long next_gc = now;
unsigned long now = jiffies;
unsigned long next_dir_update = now;
unsigned long next_gc = now;
- if (yaffs_dev_to_lc(dev)->spare_buffer) {
- YFREE(yaffs_dev_to_lc(dev)->spare_buffer);
- yaffs_dev_to_lc(dev)->spare_buffer = NULL;
+ if (struct yaffs_devo_lc(dev)->spare_buffer) {
+ YFREE(struct yaffs_devo_lc(dev)->spare_buffer);
+ struct yaffs_devo_lc(dev)->spare_buffer = NULL;
char devname_buf[BDEVNAME_SIZE + 1];
struct mtd_info *mtd;
int err;
char *data_str = (char *)data;
struct yaffs_linux_context *context = NULL;
char devname_buf[BDEVNAME_SIZE + 1];
struct mtd_info *mtd;
int err;
char *data_str = (char *)data;
struct yaffs_linux_context *context = NULL;
/* OK, so if we got here, we have an MTD that's NAND and looks
* like it has the right capabilities
/* OK, so if we got here, we have an MTD that's NAND and looks
* like it has the right capabilities
/* Deep shit could not allocate device structure */
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs_read_super: Failed trying to allocate "
/* Deep shit could not allocate device structure */
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs_read_super: Failed trying to allocate "
nandmtd2_read_chunk_tags;
param->bad_block_fn = nandmtd2_mark_block_bad;
param->query_block_fn = nandmtd2_query_block;
nandmtd2_read_chunk_tags;
param->bad_block_fn = nandmtd2_mark_block_bad;
param->query_block_fn = nandmtd2_query_block;
param->is_yaffs2 = 1;
param->total_bytes_per_chunk = mtd->writesize;
param->chunks_per_block = mtd->erasesize / mtd->writesize;
param->is_yaffs2 = 1;
param->total_bytes_per_chunk = mtd->writesize;
param->chunks_per_block = mtd->erasesize / mtd->writesize;
{
buf += sprintf(buf, "start_block........... %d\n", dev->param.start_block);
buf += sprintf(buf, "end_block............. %d\n", dev->param.end_block);
{
buf += sprintf(buf, "start_block........... %d\n", dev->param.start_block);
buf += sprintf(buf, "end_block............. %d\n", dev->param.end_block);
{
buf += sprintf(buf, "data_bytes_per_chunk.. %d\n", dev->data_bytes_per_chunk);
buf += sprintf(buf, "chunk_grp_bits........ %d\n", dev->chunk_grp_bits);
{
buf += sprintf(buf, "data_bytes_per_chunk.. %d\n", dev->data_bytes_per_chunk);
buf += sprintf(buf, "chunk_grp_bits........ %d\n", dev->chunk_grp_bits);
/* Locate and print the Nth entry. Order N-squared but N is small. */
ylist_for_each(item, &yaffs_context_list) {
struct yaffs_linux_context *dc = ylist_entry(item, struct yaffs_linux_context, context_list);
/* Locate and print the Nth entry. Order N-squared but N is small. */
ylist_for_each(item, &yaffs_context_list) {
struct yaffs_linux_context *dc = ylist_entry(item, struct yaffs_linux_context, context_list);
/* Locate and print the Nth entry. Order N-squared but N is small. */
ylist_for_each(item, &yaffs_context_list) {
struct yaffs_linux_context *dc = ylist_entry(item, struct yaffs_linux_context, context_list);
/* Locate and print the Nth entry. Order N-squared but N is small. */
ylist_for_each(item, &yaffs_context_list) {
struct yaffs_linux_context *dc = ylist_entry(item, struct yaffs_linux_context, context_list);